home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Information / THINK C Digest / 1993 / 93-07 < prev    next >
Text File  |  1995-12-31  |  116KB  |  3,506 lines

  1. 
  2. Path: ucivax!gateway
  3. From: gau@tauon.ph.unimelb.edu.au (Gary Au)
  4. Subject: flight simulator in THINK C
  5. Message-ID: <9307020715.AA62113@tauon.ph.unimelb.edu.au>
  6. X-Mailer: ELM [version 2.3 PL11]
  7. Newsgroups: fa.think-c
  8. Lines: 14
  9. Date: 2 Jul 93 07:16:00 GMT
  10.  
  11. Hi!
  12.  
  13. I am writing a freeware air to air combat/flight simulator using THINK C. I've
  14. seen lots of IBM air combat games, and was thinking of doing something
  15. similar for the mac - something like Falcon, but for low level nape of the
  16. earth flying... lots of mountains flying past etc. Does anyone know the
  17. secrets of flight sim algorithms? An idea was to store the ground as
  18. a 2D array, and do a 3D perspective job on the thing. The drawback of this
  19. technique is that the graphics take too long to draw. I mean, calling
  20. Lineto all the time is CPU intensive. How about storing the current position
  21. as a point, and drawing the graphics depending on where that point is?
  22.  
  23. gary
  24.  
  25. 
  26. 
  27. Path: ucivax!gateway
  28. From: de19@umail.umd.edu (Dana S Emery)
  29. Subject: Re: flight simulator in THINK C
  30. Message-ID: <Mailstrom.1.03.56493.9528.de19@umail.umd.edu>
  31. In-Reply-To: Your message <9307020715.AA62113@tauon.ph.unimelb.edu.au> of 2
  32.  Jul 93 07:16:00 GMT
  33. Content-Type: TEXT/plain; charset=US-ASCII
  34. Newsgroups: fa.think-c
  35. Lines: 13
  36. Date: 2 Jul 93 16:38:18 GMT
  37.  
  38. off screen pixmaps is the only way to go, there you know you are in RAM, and can
  39. use non-quickdraw drawing techniques with impunity.
  40.  
  41. The subsequent screen update is done efficiently and legally.
  42.  
  43. Develop magazine and Mactutor (now MacTech) have had several articles on this
  44. and on GWorld manipulation, you need familiarity with both.
  45.  
  46. dont have indexes on hand, but develop is cheap enough to get on CD rom, talk to
  47. APDA.
  48. --
  49. dana s emery <de19@umail.umd.edu>
  50.  
  51. 
  52. 
  53. Path: ucivax!gateway
  54. From: fdeming@aecmail.cv.com (Frank Deming x6088)
  55. Subject: Re: flight simulator in THINK C
  56. Message-ID: <9307021655.AA27616@lynx.aecmail.CV.com>
  57. Newsgroups: fa.think-c
  58. Lines: 4
  59. Date: 2 Jul 93 16:54:32 GMT
  60.  
  61. There is a book out on writing a flight simulator and using c++. The name
  62. escapes me at the moment
  63.  
  64. Frank Deming
  65. 
  66. 
  67. Path: ucivax!gateway
  68. From: gregf@vulture.sps.mot.com (Greg Ferguson)
  69. Subject: Re: flight simulator in THINK C
  70. Message-ID: <9307021800.AA09724@spsgate.sps.mot.com>
  71. Content-Type: text/plain; charset="us-ascii"
  72. Mime-Version: 1.0
  73. Newsgroups: fa.think-c
  74. Lines: 36
  75. Date: 2 Jul 93 18:00:43 GMT
  76.  
  77. At  7:16 AM 7/2/93 +0000, Gary Au wrote:
  78. >I am writing a freeware air to air combat/flight simulator using THINK C. I've
  79. >seen lots of IBM air combat games, and was thinking of doing something
  80. >similar for the mac - something like Falcon, but for low level nape of the
  81. >earth flying... lots of mountains flying past etc. Does anyone know the
  82. >secrets of flight sim algorithms? An idea was to store the ground as
  83. >a 2D array, and do a 3D perspective job on the thing. The drawback of this
  84. >technique is that the graphics take too long to draw. I mean, calling
  85. >Lineto all the time is CPU intensive. How about storing the current position
  86. >as a point, and drawing the graphics depending on where that point is?
  87.  
  88. The guy who wrote Microsoft's Flight Simulator wrote a book about graphics
  89. on the IBM. I think he discusses the techniques needed for that style of
  90. program. Unfortunately, I'm at work and the book is at home, and I haven't
  91. looked at it in so long I can't remember what it's called. I'll try to
  92. remember to look tonight and follow up later.
  93.  
  94. Greg
  95.  
  96.  
  97. -=-=-=-=-=-=-
  98. Greg Ferguson                           email:  rtmd30@email.sps.mot.com
  99. Programmer/Engineer                     voice:  602.952.3623
  100. Desktop Networking Systems
  101. World Marketing
  102. Motorola, SPS
  103.  
  104. *************************************************************
  105. Don't worry, though, it will be just as easy to spot
  106. Pentium-equipped PCs as it is to spot PCs now. Almost all of
  107. them come with this useful little warning required by the
  108. Truth In Advertising Act, saying "Intel Inside."
  109.         - Pythaeus in TidBits
  110. *************************************************************
  111.  
  112.  
  113. 
  114. 
  115. Path: ucivax!gateway
  116. From: Dr.A.Scottedward.Hodel@eng.auburn.edu ("A. Scottedward Hodel")
  117. Subject: f2c and things you can't find.
  118. Full-Name: A. Scottedward Hodel
  119. Message-ID: <9307021823.AA23631@eng.auburn.edu>
  120. Newsgroups: fa.think-c
  121. Lines: 9
  122. Date: 2 Jul 93 18:24:06 GMT
  123.  
  124.  
  125. I'm trying to port a small C++ numerical package I wrote for a Unix
  126. dumb terminal in C++ onto my Mac.  Much of the code is Fortran
  127. converted to C++ with f2c (recently posted to info-mac).  The problem
  128. is that I'm regularly encountering undefined functions/incorrect
  129. numbers of arguments, etc., even in the simple f2c example, when
  130. using Symatec C++.  Is there some relatively painless procedure to
  131. identify which headers/libraries one should use when these errors
  132. arise?
  133. 
  134. 
  135. Path: ucivax!gateway
  136. From: jimlynch@netcom.com (Jim Lynch)
  137. Subject: Re:  flight simulator in THINK C
  138. Message-ID: <9307022220.AA25837@netcom2.netcom.com>
  139. Newsgroups: fa.think-c
  140. Lines: 14
  141. Date: 2 Jul 93 22:20:30 GMT
  142.  
  143. Math-wise, you need calculus (to find rates of change) and physics.
  144.  
  145. Assume you have a position function based on time, gravity, weight, lift, wind
  146. and thrust (together with direction of lift, of thrust and of wind).
  147.  
  148. If you took calculus you know how to differentiate that position function
  149. which gives you speed (and differentiating that gives you acceleration.)
  150.  
  151. Then all you would need are the specifics of the plane.
  152.  
  153. For more realism, you could map wind patterns such as those that surround
  154. mountains or wind events such as thermals, wind shears and tornado/hurricanes.
  155.  
  156. Of course, speed suffers as you take more things into account.
  157. 
  158. 
  159. Path: ucivax!gateway
  160. From: nagel@kithrup.irvine.ca.us ("Mark D. Nagel")
  161. Subject: Re: flight simulator in THINK C
  162. Message-ID: <0E010598.5lt1n7@kithrup.Irvine.CA.US>
  163. X-Mailer: uAccess - Macintosh Release: 1.6v1
  164. Newsgroups: fa.think-c
  165. Reply-To: nagel@kithrup.irvine.ca.us
  166. Lines: 15
  167. Date: 3 Jul 93 15:36:53 GMT
  168.  
  169.  
  170. In Regards to your letter <9307021655.AA27616@lynx.aecmail.CV.com>:
  171. > There is a book out on writing a flight simulator and using c++. The name
  172. > escapes me at the moment
  173.  
  174. You are probably thinking of Flights of Fantasy by Christopher Lampton (ISBN
  175. 1-878739-18-2).
  176.  
  177. It's a cool book, but its details focus on PC graphics, and many have noted
  178. various flaws in the code.  However, it goes into 3D polygon rendering, hidden
  179. surface removal, and other stuff you need for flight simulators.  It comes
  180. with a disk containing source and executables, but the executables are for
  181. the PC, of course.
  182.  
  183. Mark
  184. 
  185. 
  186. Path: ucivax!gateway
  187. From: pfterry@msmail.kgs.ukans.edu (pfterry)
  188. Subject: CMaster 1.2 -> 1.2.3 updater
  189. Message-ID: <9307030949.aa03351@q2.ics.uci.edu>
  190. Newsgroups: fa.think-c
  191. Lines: 23
  192. Date: 3 Jul 93 16:50:00 GMT
  193.  
  194.  
  195.  
  196. I have uploaded the CMaster 1.2.3 updater to the ThinkC and TCL ftp sites and
  197. sent it to MacGifts. It should appear on the other popular ftp sites after the
  198. holiday. Here's the description uploaded with the updater.
  199.  
  200. This updater converts CMaster 1.2.1 or 1.2.2 to version 1.2.3. This  newest
  201. release contains a fix to the option-dbl-click problem and scrolling to
  202. preceding comments should now work correctly. Key equivalents for THINK C 6
  203. changed, so some of our key binding routines changed to reflect these. A couple
  204.  other minor fixes including the v scroll bar pixel that was erased sometimes.
  205.  
  206. Enjoy.
  207.  
  208. pf
  209.  
  210. +++++++++++++++++++++++++++++++++++++++++++++
  211. Fred Terry, Kansas Geological Survey
  212. 1930 Constant Ave., Lawrence, KS  66047
  213. pfterry@cyberpunk.kgs.ukans.edu
  214. +++++++++++++++++++++++++++++++++++++++++++++
  215.  
  216. I've tried to relax, but--I dunno--I seem to be more comfortable tense.
  217. 
  218. 
  219. Path: ucivax!gateway
  220. From: pfterry@msmail.kgs.ukans.edu (pfterry)
  221. Subject: Another ftp site for the CMaster updater
  222. Message-ID: <9307030956.aa03689@q2.ics.uci.edu>
  223. Newsgroups: fa.think-c
  224. Lines: 17
  225. Date: 3 Jul 93 16:56:37 GMT
  226.  
  227.  
  228.  
  229. Just in case someone is actually trying to get something done this week and
  230. wants/needs the updater, I've placed it on syrinx.kgs.ukans.edu. You'll find it
  231. in topsoft/other.stuff/.
  232.  
  233. Enjoy.
  234.  
  235. pf
  236.  
  237. +++++++++++++++++++++++++++++++++++++++++++++
  238. Fred Terry, Kansas Geological Survey
  239. 1930 Constant Ave., Lawrence, KS  66047
  240. pfterry@cyberpunk.kgs.ukans.edu
  241. +++++++++++++++++++++++++++++++++++++++++++++
  242.  
  243. I've tried to relax, but--I dunno--I seem to be more comfortable tense.
  244. 
  245. 
  246. Path: ucivax!gateway
  247. From: nagel@kithrup.irvine.ca.us ("Mark D. Nagel")
  248. Subject: Re: flight simulator in THINK C
  249. Message-ID: <0E010598.5lu509@kithrup.Irvine.CA.US>
  250. X-Mailer: uAccess - Macintosh Release: 1.6v1
  251. Newsgroups: fa.think-c
  252. Reply-To: nagel@kithrup.irvine.ca.us
  253. Lines: 16
  254. Date: 3 Jul 93 17:27:48 GMT
  255.  
  256.  
  257. In Regards to Dana S Emery's letter <Mailstrom.1.03.56493.9528.de19@umail.umd.edu>:
  258. > off screen pixmaps is the only way to go, there you know you are in RAM, and
  259. > can use non-quickdraw drawing techniques with impunity.
  260. >
  261. > The subsequent screen update is done efficiently and legally.
  262.  
  263. This is true to an extent, but CopyBits is often too slow for games
  264. where you have to get 15 or more frames per second (ignoring those
  265. games like Maelstrom and Space Madness which are designed to move as
  266. little of the screen around as possible per frame).
  267.  
  268. Most games have to go direct-to-screen and build in compatibility modes
  269. to allow future machines to use Quickdraw in case Apple breaks the current
  270. methods for drawing directly to the screen (which they promise will happen
  271. when the PowerPC comes out).
  272. 
  273. 
  274. Path: ucivax!gateway
  275. From: evans@natural.com (Christopher Evans)
  276. Subject: PD regexp or grep source
  277. Message-ID: <9307042255.AA12490@natural.com>
  278. Newsgroups: fa.think-c
  279. Lines: 17
  280. Date: 5 Jul 93 07:16:22 GMT
  281.  
  282.  
  283.     I need to write a text find function for a text editor and would like
  284. to include a Regular Expression option.  Can anyone point me towards some
  285. source code that will make my job easier?
  286.  
  287.     Thanks!
  288.  
  289. <==================================Q======================================>
  290.   Christopher Evans                |   Internet: evans@natural.com
  291.   Director, Software Development   |   Phone: 617-876-4876
  292.   Natural Intelligence, Inc.       |   FAX:   617-492-7425
  293.   2067 Massachusetts Avenue        |   AppleLink: NATURAL
  294.   Cambridge MA  02140              |   or evans@natural.com@INTERNET#
  295.  
  296.     If God is perfect, why did He create discontinuous functions?
  297.  
  298.  
  299. 
  300. 
  301. Path: ucivax!gateway
  302. From: TPZ4@vm.cnuce.cnr.it (Rodolfo Cardarel)
  303. Subject: Bandwith waste
  304. Message-ID: <9307050523.aa06295@q2.ics.uci.edu>
  305. Newsgroups: fa.think-c
  306. Lines: 9
  307. Date: 5 Jul 93 12:23:27 GMT
  308.  
  309. Maybe it's just a stupid suggestion, but, as lots of people keep on
  310. misunderstanding the correct usage of think-c and think-c-request (I did the
  311. same mistake myself...) why not changing the two account names to something
  312. more understandable, as, for example, administration-think-c and q&a-think-c?
  313. And, by the way, could you give me the correct location of the f2c s/w, it
  314. should be on info-mac of sumex-aim, but I'm not sure.
  315. Thank you
  316.  
  317. Rodolfo Cardarelli TPZ4@ICNUCEVM.CNUCE.CNR.IT
  318. 
  319. 
  320. Path: ucivax!gateway
  321. From: berthoms@frbdx11.cribx1.u-bordeaux.fr (Jean Berthomieu)
  322. Subject: Re: Bandwith waste
  323. Message-ID: <9307051641.AA04743@frbdx11.cribx1.u-bordeaux.fr>
  324. In-Reply-To: <9307050523.aa06295@q2.ics.uci.edu> from "Rodolfo Cardarel" at Jul 5, 93 12:23:27 pm
  325. X-Mailer: ELM [version 2.4 PL22]
  326. Content-Type: text
  327. Content-Length: 1087
  328. Newsgroups: fa.think-c
  329. Lines: 23
  330. Date: 5 Jul 93 15:43:25 GMT
  331.  
  332. >
  333. > Maybe it's just a stupid suggestion, but, as lots of people keep on
  334. > misunderstanding the correct usage of think-c and think-c-request (I did the
  335. > same mistake myself...) why not changing the two account names to something
  336. > more understandable, as, for example, administration-think-c and q&a-think-c?
  337. > And, by the way, could you give me the correct location of the f2c s/w, it
  338. > should be on info-mac of sumex-aim, but I'm not sure.
  339. > Thank you
  340. >
  341. > Rodolfo Cardarelli TPZ4@ICNUCEVM.CNUCE.CNR.IT
  342. >
  343. R1) There would be people who would misunderstand the correct usage
  344.     of administration-think-c and q&a-think-c anyway!
  345.     and since it is a standard on Internet to call xxx-request the xxx list
  346.     manager address, why change it now?
  347.  
  348. R2) The original repository of f2c is research.att.com in /netlib/f2c
  349.     There you will find the latest release.
  350.     At prep.ai.mit.edu you may find one (or two) previous release which may
  351.     be more fitted to your Unix(?) system in /pub/gnu.
  352.     There has been a recent posting of f2c - for THINK_C - at:
  353.     sumex-aim.stanford.edu.
  354.  
  355. 
  356. 
  357. Path: ucivax!gateway
  358. From: de19@umail.umd.edu (Dana S Emery)
  359. Subject: Re: Bandwith waste
  360. Message-ID: <Mailstrom.1.03.61699.-3114.de19@umail.umd.edu>
  361. In-Reply-To: Your message <9307050523.aa06295@q2.ics.uci.edu> of 5 Jul 93
  362.  12:23:27 GMT
  363. Content-Type: TEXT/plain; charset=US-ASCII
  364. Newsgroups: fa.think-c
  365. Lines: 19
  366. Date: 5 Jul 93 18:54:41 GMT
  367.  
  368. >   Maybe it's just a stupid suggestion, but, as lots of
  369. >   people keep on misunderstanding the correct usage of
  370. >   think-c and think-c-request
  371.  
  372. mumble-request is the traditional way to name the admin address of a list named
  373. mumble.
  374.  
  375. thats the standard folks, good or bad.  Several hundred lists use it, any
  376. attempt to change it now would likely fail, and would certainly cause lots of
  377. confusion.
  378.  
  379. Interestingly, all the lists I am a member of (including Think-c) issue a
  380. welcomeing message to newly subscribed members which explains this.
  381.  
  382. I dont know about you, but I take the time to both read and archive the welcomes
  383. I get.
  384. --
  385. dana s emery <de19@umail.umd.edu>
  386.  
  387. 
  388. 
  389. Path: ucivax!gateway
  390. From: mauricio@mozart.aero.ufl.edu
  391. Subject: Help reading data from file
  392. Message-ID: <9307051927.AA02127@mozart.aero.ufl.edu>
  393. Newsgroups: fa.think-c
  394. Lines: 27
  395. X-Mts: smtp
  396. Date: 5 Jul 93 19:27:38 GMT
  397.  
  398.     I am trying to write a code in Think C (Actually Think
  399. Lightspeed C 2.15...) that reads a file character-by-character
  400. (actually, it should be alphanumeric, but...) and process it according
  401. to the type of character.  The algorythm would be something like:
  402.  
  403. Open infile and outfile
  404.  
  405. While you did not reach EOF:
  406. {
  407.     fget (infile, char) (I think)
  408.  
  409.         case char
  410.         {
  411.  
  412.             uppercase: do something
  413.             lowercase: do something else
  414.             number: handle accordingly
  415.  
  416.         }
  417.  
  418.     Write modified stuff in outfile
  419. }
  420. close files
  421.  
  422.  
  423. How can I do such think under Think C?  Can I use fget/fput as I seem
  424. fit?  If not, is there some kind of Mac-exclusive function I should use?
  425. 
  426. 
  427. Path: ucivax!gateway
  428. From: arentz@indy.knoware.nl (Stefan Arentz)
  429. Subject: (Q) Beta-Testers Wanted
  430. X-Sender: arentz@pop.knoware.nl (Unverified)
  431. Message-ID: <9307052222.AA23728@indy.knoware.nl>
  432. Newsgroups: fa.think-c
  433. Lines: 49
  434. Date: 5 Jul 93 21:22:15 GMT
  435.  
  436. Hello World,
  437.  
  438. I'm looking for beta-testers for a library I am writing. It's a
  439. replacement for the Dialog Manager, because the Dialog Manager
  440. has some shortcomings.
  441.  
  442.  
  443. Here are the features of the 'XDialogManager' library:
  444.  
  445.  - More kinds of item types: OKButton, CancelButton, Button,
  446.    CheckBox, RadioButton, List, Border, EditText, StaticText,
  447.    UserItem, Icon, Picture, PopupMenu.
  448.  
  449.  - Button and text items can use custom fonts (specified in the
  450.    XDTL resource).
  451.  
  452.  - Radio buttons have a groups ID number. The library
  453.    automatically updates radio button groups.
  454.  
  455.  - Buttons can have a command-key equivalent, like BBEdit does.
  456.  
  457.  - All items can be visible/invisible and enabled/disabled. Text
  458.    items are dimmed.
  459.  
  460.  - Better userProc for UserItems (draw & click messages).
  461.  
  462.  - Compatibility with System Seven and Six.
  463.  
  464.  - Interface for C and Pascal.
  465.  
  466.  - Libraries for MPW C/Pascal and THINK C/Pascal compilers.
  467.  
  468.  
  469. And I'm working on:
  470.  
  471.  - ResEdit Editor for 'XDTL' resources.
  472.  
  473.  
  474. If you think this library is useful for you, then please respond,
  475. to this message and I will send you the latest version. I would
  476. like to hear from you what you think of the API, if you found
  477. bugs and if you miss a feature in this library.
  478.  
  479. -- Stefan
  480.  
  481.  
  482. ----------------------------------------------------------------------------
  483. Stefan Arentz          -  Software Constructor  -          arentz@knoware.nl
  484.  
  485. 
  486. 
  487. Path: ucivax!gateway
  488. From: arentz@indy.knoware.nl (Stefan Arentz)
  489. Subject: (Q) Popup Menus in Windows
  490. X-Sender: arentz@pop.knoware.nl (Unverified)
  491. Message-ID: <9307052223.AA23731@indy.knoware.nl>
  492. Newsgroups: fa.think-c
  493. Lines: 19
  494. Date: 5 Jul 93 21:22:19 GMT
  495.  
  496. Hello World,
  497.  
  498. I'm having trouble with popup menus in a window. I install the popup
  499. menu with _NewControl. If a mouseDown event in the window occurs and
  500. if _FindControl says it's my control, then I call _TrackControl. The
  501. strange thing is that _TrackControl works with the Buttons,
  502. RadioButtons and CheckBoxes in the window, but not with the popup
  503. menu. The popup menu's title is tracked (and highlighted), but the
  504. menu never pops up. The 'MENU' resource isn't missing, because the
  505. first item of menu is set to the first item in the 'MENU' resource.
  506.  
  507. Any Ideas? What am I doing wrong?
  508.  
  509. -- Stefan
  510.  
  511.  
  512. ----------------------------------------------------------------------------
  513. Stefan Arentz          -  Software Constructor  -          arentz@knoware.nl
  514.  
  515. 
  516. 
  517. Path: ucivax!gateway
  518. From: johan@teracons.com (Johan Strandberg)
  519. Subject: Re: Help reading data from file
  520. X-Sender: johan@teracons.com (Unverified)
  521. Message-ID: <9307060213.AA02185@teracons.com>
  522. Newsgroups: fa.think-c
  523. Lines: 174
  524. Date: 6 Jul 93 02:13:16 GMT
  525.  
  526. At  7:27 PM 7/5/93 +0000, mauricio@mozart.aero.ufl.edu wrote:
  527. >        I am trying to write a code in Think C (Actually Think
  528. >Lightspeed C 2.15...)
  529.  
  530. You really shouldn't use that old a version of Think C since it has serious
  531. compatibility problems with recent 680x0 processors (at least the 040 and
  532. 030) that would make the code unreliable on any recent Macintosh.
  533. (Basically there is some missing flushes of the instruction cache.)  I
  534. forget at what version it was fixed -- somebody out there no doubt
  535. remembers.  I understand that there might be economical reasons not to
  536. upgrade, but you should remember this warning when you run into strange
  537. problems.
  538.  
  539. The code below was tested under THINK C 6.0.  I don't remember all the
  540. restrictions to version 2.15, so there might be some problems compiling the
  541. code below straight as it is under your compiler.  What I have written is
  542. pretty much Standard C (it also compiles under C++).
  543.  
  544.  
  545. >that reads a file character-by-character
  546. >(actually, it should be alphanumeric, but...) and process it according
  547. >to the type of character.  The algorythm would be something like:
  548. >
  549. >Open infile and outfile
  550. >
  551. >While you did not reach EOF:
  552. >{
  553. >        fget (infile, char) (I think)
  554. >
  555. >                case char
  556. >                {
  557. >
  558. >                        uppercase: do something
  559. >                        lowercase: do something else
  560. >                        number: handle accordingly
  561. >
  562. >                }
  563. >
  564. >        Write modified stuff in outfile
  565. >}
  566. >close files
  567. >
  568. >
  569. >How can I do such think under Think C?  Can I use fget/fput as I seem
  570. >fit?  If not, is there some kind of Mac-exclusive function I should use?
  571.  
  572. Here is some code that will do what you want.  Replace the code inside the
  573. while statement with whatever you wish.
  574.  
  575. If the following is in the file example.in:
  576.  
  577.         ABCDEFGHIJKlmnopqrstuvxyz0123456789+-
  578.         Four scores and 7 years ago...
  579.  
  580. The the file example.out will become:
  581.  
  582.         XXXXXXXXXXXxxxxxxxxxxxxxx9999999999..
  583.         Xxxx xxxxxx xxx 9 xxxxx xxx...
  584.  
  585.  
  586. Good Luck!
  587.  
  588.  
  589. --johan
  590.  
  591.  
  592.  
  593.  
  594. /*======================================================================
  595.     Example of file I/O in C by Johan Strandberg, 1993
  596.     This code is in the public domain.  Share and Enjoy!
  597. ======================================================================*/
  598. #include <stdio.h>
  599. #include <ctype.h>
  600. #include <errno.h>
  601.  
  602.  
  603.  
  604. /*======================================================================
  605. |           transformFile()
  606. |-----------------------------------------------------------------------
  607. |   Open the inFile and outfile.  Read each character of inFile, and
  608. |   for each character do some processing.
  609. |
  610. |   Please note that the "functions" isupper(), islower(), etc are
  611. |   *very* fast since they are normally implemented as macros that do
  612. |   table lookup.  Never write:
  613. |
  614. |           if ('A' <= ch && 'Z' >= ch)
  615. |
  616. |   instead use:
  617. |
  618. |           if (isupper(ch))
  619. |
  620. |   This generates faster code (and more correct, the above doesn't
  621. |   always work with non-ASCII character sets).
  622. |
  623. |
  624. |   Takes:
  625. |       inFile      Pointer to the name of the input file.
  626. |       outFile     Pointer to the name of the output file.  This file
  627. |                   will be replaced if it is already there and created
  628. |                   if it is not.  There is no explicit code to set
  629. |                   the Type and Creator of the file, so the actual
  630. |                   Type/Creator will depend on the I/O library used
  631. |                   by the compiler.
  632. |
  633. |   Returns:    0   Success.
  634. |               !0  The error code.
  635. |---------------------------------------------------------------------*/
  636. int transformFile(const char *inFile, const char *outFile)
  637. {
  638.     FILE    *in;        /* File pointer to the input file */
  639.     FILE    *out;       /* File pointer to the output file */
  640.     int     err;        /* To store temporary error values */
  641.     int     ch;         /* Make sure it's an int! */
  642.  
  643.  
  644.     errno = 0;
  645.     in = fopen(inFile, "r");
  646.     if (errno) {
  647.         return errno;
  648.     }
  649.  
  650.     errno = 0;
  651.     out = fopen(outFile, "w");
  652.     if (errno) {
  653.         err = errno; /* save errno since fclose will scramble it */
  654.         fclose(in);
  655.         return err;
  656.     }
  657.  
  658.     while ((ch = fgetc(in)) != EOF) {
  659.         /* This section would contain whatever transformations you want */
  660.         if (isupper(ch)) {
  661.             fputc('X', out);    /* Replace all upper case characters with 'X' */
  662.         } else if (islower(ch)) {
  663.             fputc('x', out);    /* Replace all lower case characters with 'x' */
  664.         } else if (isdigit(ch)) {
  665.             fputc('9', out);    /* Replace all digits with '9' */
  666.         } else if (isspace(ch)) {
  667.             fputc(ch, out);     /* Preserve all whitespace */
  668.         } else {
  669.             fputc('.', out);    /* Replace all other characters with '.' */
  670.         }
  671.     }
  672.  
  673.     /*  Intentionally ignore all error messages during fclose.
  674.         There isn't much else to do if it fails anyway...
  675.     */
  676.     fclose(in);
  677.     fclose(out);
  678.  
  679.     return 0;
  680. }
  681.  
  682.  
  683. /*======================================================================
  684. |           main()
  685. |-----------------------------------------------------------------------
  686. |   This is just a simple main() to test the transformFile code.  Since
  687. |   this is just an example, we don't have code for fetching the
  688. |   file names here.  Instead we just use the fixed names of example.in
  689. |   and example.out when we call the transformFile example.
  690. |
  691. |   Returns:    0   - Always succeeds
  692. |---------------------------------------------------------------------*/
  693. int main(void)
  694. {
  695.     transformFile("example.in", "example.out");
  696.  
  697.     return 0;
  698. }
  699.  
  700. 
  701. 
  702. Path: ucivax!gateway
  703. From: johan@teracons.com (Johan Strandberg)
  704. Subject: Re: PD regexp or grep source
  705. X-Sender: johan@teracons.com (Unverified)
  706. Message-ID: <9307060213.AA02188@teracons.com>
  707. Newsgroups: fa.think-c
  708. Lines: 32
  709. Date: 6 Jul 93 02:13:22 GMT
  710.  
  711. At  7:16 AM 7/5/93 +0000, Christopher Evans wrote:
  712. >        I need to write a text find function for a text editor and would like
  713. >to include a Regular Expression option.  Can anyone point me towards some
  714. >source code that will make my job easier?
  715. >
  716. >        Thanks!
  717.  
  718.  
  719. You should look into Henry Spencer's regexp library.  It is the industry
  720. standard for all practical purposes and it's free and
  721. "nearly-public-domain".  The README file states in part:
  722.  
  723.         Permission is granted to anyone to use this software for any
  724.         purpose on any computer system, and to redistribute it freely,
  725.         subject to the following restrictions:
  726.  
  727.         1. The author is not responsible for the consequences of use
  728.            of this software, no matter how awful, even if they arise
  729.            from defects in it.
  730.  
  731.         2. The origin of this software must not be misrepresented,
  732.            either by explicit claim or by omission.
  733.  
  734.         3. Altered versions must be plainly marked as such, and must
  735.            not be misrepresented as being the original software.
  736.  
  737. It's available from *many* archive sites on the net (use archie to get a
  738. fresh list), just look for regexp.
  739.  
  740.  
  741. --johan
  742.  
  743. 
  744. 
  745. Path: ucivax!gateway
  746. From: udsugar@cerebrum.impaqt.drexel.edu (David Sugar)
  747. Subject: Questions???
  748. Message-ID: <9307061340.AA14279@impaqt.drexel.edu>
  749. Newsgroups: fa.think-c
  750. Lines: 25
  751. Date: 6 Jul 93 13:46:17 GMT
  752.  
  753.  
  754.   I am currently working on a program and can't seem to figure out how to
  755. do some things that I want to do, they don't seem like they would be to
  756. hard, but I can't find them mentioned.
  757.  
  758.   The first should be real easy.  I need to build a menu that looks just
  759. like the finder's "label" menu.  I want to give the user a choice of a
  760. label, and using the same menu (same text, same colors etc) seems like
  761. the best way to do it, but I can't find the label menu stored anywhere.
  762. Is there a way to access this info from a program??
  763.  
  764.   Second question, a little bit harder.  I want a way to open a finder
  765. window from this program.  Like if I have a directory ID of some directory
  766. in this application I would like to be able to automaticly open this
  767. window in the finder for the user.  (I know that I should only do this
  768. after asking the user if I should do it or not and the user interface
  769. stuff)..
  770.  
  771.  
  772.   Thanks for any answers
  773.   Dave Sugar
  774.   udsugar@impaqt.drexel.edu
  775.   udsugar@mcs.drexel.edu
  776.  
  777.  
  778. 
  779. 
  780. Path: ucivax!gateway
  781. From: psm20@cd.amdahl.com ("Paul S. Michelsen")
  782. Subject: Re: (Q) Beta-Testers Wanted
  783. Message-ID: <9307061636.AA12182@manager.cd.amdahl.com>
  784. In-Reply-To: <9307052222.AA23728@indy.knoware.nl> (message from Stefan Arentz on 5 Jul 93 21:22:15 GMT)
  785. Newsgroups: fa.think-c
  786. Lines: 34
  787. Date: 6 Jul 93 16:39:35 GMT
  788.  
  789.   >Hello World,
  790.   >
  791.   >I'm looking for beta-testers for a library I am writing. It's a
  792.   >replacement for the Dialog Manager, because the Dialog Manager
  793.   >has some shortcomings.
  794.   >
  795.   >Here are the features of the 'XDialogManager' library:
  796.  
  797.    [list of goodies]
  798.  
  799.   >And I'm working on:
  800.   >
  801.   > - ResEdit Editor for 'XDTL' resources.
  802.   >
  803.   >If you think this library is useful for you, then please respond,
  804.   >to this message and I will send you the latest version. I would
  805.   >like to hear from you what you think of the API, if you found
  806.   >bugs and if you miss a feature in this library.
  807.   >
  808.   >-- Stefan
  809.   >
  810.   >
  811.   >----------------------------------------------------------------------------
  812.   >Stefan Arentz          -  Software Constructor  -          arentz@knoware.nl
  813.  
  814. I'm interested in having a look at it.  Could you send me a copy?
  815. Thanks.  (I assume it comes with full source code and documentation.)
  816.  
  817. Thanks.
  818.  
  819. =|<>|=  Paul S. Michelsen                  Eventually, computers will be
  820. =|  |=  psm20@cd.amdahl.com              infinitely fast, impossibly small,
  821. =|  |=  ext x23224, rm M2-160                       and free.
  822. =|__|=  Amdahl, Sunnyvale, California
  823. 
  824. 
  825. Path: ucivax!gateway
  826. From: ahouse@hydra.rose.brandeis.edu (Jeremy John Ahouse)
  827. Subject: HT like string manipulations
  828. Message-ID: <9307062241.AA23080@hydra.rose.brandeis.edu>
  829. Newsgroups: fa.think-c
  830. Lines: 31
  831. Date: 6 Jul 93 22:38:54 GMT
  832.  
  833. Does anyone know if there is a library for C or C++ that implements
  834. container manipulations like HyperTalk.  Manipulating strings is so easy in
  835. HyperTalk it would be great to do this in C.  I may have to write it myself
  836. but if someone already has... Of course it doesn't have to be == to HT and
  837. rich set of string manipulations would be nice... ideas??
  838.  
  839.         Thanks,
  840.  
  841.         - Jeremy
  842.  
  843.         :::::::::::::::::::::::::::::::::::::::::::
  844.         Jeremy John Ahouse
  845.         Biology Dept and Center for Complex Systems
  846.         Brandeis University
  847.         Waltham, MA 02254-9110
  848.  
  849.         (617) 736-4954
  850.         email: ahouse@hydra.rose.brandeis.edu
  851.         Mail from Mac by Eudora 1.3.1
  852.  
  853.         "Si un hombre nunca se contradice, sera porque nunca dice nada"
  854.                 - Miguel de Unamuno
  855.  
  856. RIPEM accepted.
  857. PublicKeyInfo:
  858.  MH8wCgYEVQgBAQICAzYDcQAwbgJnNZ6A64065Jt9uKprRlOWtbi1N7C82eQcmse3
  859.  ahK9j3Y86tayGz9iqg0OIBhQFe7qRqxW+j6MM81sxlxDf23x1ecvyva9uhaLPLJR
  860.  2Kttl56iG3u11WWcyf7SeW3dW/JW0DQ5gnTqUwIDAQAB
  861. MD5OfPublicKey: 0E6662766C4D0BDAB766A6B4DA80242A
  862.  
  863.  
  864. 
  865. 
  866. Path: ucivax!gateway
  867. From: LAFARCIOLA@ichcmns.cmns.mnegri.it
  868. Subject: Library wanted...
  869. Message-ID: <0DC22F535D5F2018CF@ichcmns.cmns.mnegri.it>
  870. Content-transfer-encoding: 7BIT
  871. X-VMS-Cc: lafarciola
  872. Newsgroups: fa.think-c
  873. X-VMS-To: in%"think-c@ics.uci.edu"
  874. Lines: 9
  875. Date: 7 Jul 93 08:57:44 GMT
  876.  
  877. Hello!
  878. Where can I find a statistical library?
  879. Is there an archive where I can ftp it?
  880.  
  881. Thanks for any help,
  882.         -Massimo-
  883.  
  884. E-mail: lafarciola@ichcmns.cmns.mnegri.it
  885.  
  886. 
  887. 
  888. Path: ucivax!gateway
  889. From: LAWA%IAPE.AFRC.AC.UK@ib.rl.ac.uk (Big Nose)
  890. Subject: THINK Reference
  891. Via: UK.AC.AFRC.IAPE;  8 JUL 93 15:48:52 BST
  892. Message-ID: <9307080746.aa24822@q2.ics.uci.edu>
  893. Newsgroups: fa.think-c
  894. Lines: 10
  895. Date: 8 Jul 93 14:46:55 GMT
  896.  
  897.  
  898. I know this probably isn't strictly a proper question, but would anyone
  899. care to tell me the current US Street price for THINK Reference. It's a
  900. possibility that I may get a friend to buy it for me when he's over, if
  901. it's much cheaper that is.
  902.  
  903. Thanks in advance,
  904.  
  905. Andy Law
  906. ( LAWA @ IAPE.AFRC.AC.UK                       Big Nose in Edinburgh )
  907. 
  908. 
  909. Path: ucivax!gateway
  910. From: Christopher_Dixson@rand.org (Chris Dixson)
  911. Subject: Readings Files
  912. Message-ID: <9307081803.AA13591@twain.rand.org>
  913. Newsgroups: fa.think-c
  914. Lines: 18
  915. Date: 8 Jul 93 18:04:10 GMT
  916.  
  917.  
  918.  I'm writing a program that converts rtf files.  So far this app allows
  919. the user to select the file to convert, runs thru a simple conversion, and
  920. then allows the user to save the converted file with a new name.  These
  921. parts all work okay.  (For debugging purposes I've put up a console window
  922. to display the text as it is read in and converted but the final app will
  923. not display this text to the user).
  924.  
  925.  What I want to do next is implement a mappings file. This would compare
  926. lines in the original file with this mapping file and substitute specific
  927. rtf code with new rtf code. Any suggestions on the best way to implement
  928. this? I'm having problems just reading in the mappings file. It's in the
  929. same dir as the app itself but I'm having trouble using GetSFCurDir to get
  930. the current dir and then building the FSSpec. I know StandardGetFile builds
  931. the FSSpec but how do you open a specific file in a specific dir without
  932. using StandardGetFile?  Any help would be greatly appreciated! :-)
  933.  
  934.  Thanks,        -Chris
  935. 
  936. 
  937. Path: ucivax!gateway
  938. From: kirk_crawford@qmail2.aero.org (Kirk Crawford)
  939. Subject: Think C 6.0
  940. Message-ID: <199307082104.AA10021@aerospace.aero.org>
  941. Posted-Date: 7 Jul 93 16:00:57 U
  942. Newsgroups: fa.think-c
  943. Lines: 11
  944. Date: 8 Jul 93 21:04:42 GMT
  945.  
  946. Subject:  Think C 6.0
  947. Well, I have the new beast installed.  I like it overall, but I do have one
  948. peeve right off the bat.
  949.  
  950. When I open a project file with it, it does not set the directory that standard
  951. file uses to the directory with the project in it.  So, after opening a project
  952. via an alias or something, to open a text file in the same folder I have to
  953. navigate with STDFile again.  Think C 5 did not do this.  Any ideas?  Is an
  954. update due out soon?
  955.  
  956.  
  957. 
  958. 
  959. Path: ucivax!gateway
  960. From: Steve_A_Hales@cup.portal.com
  961. Subject: Think 6.0 Extentions Technical info
  962. Message-ID: <9307081713.2.18652@cup.portal.com>
  963. Newsgroups: fa.think-c
  964. X-Origin: The Portal System (TM)
  965. Lines: 10
  966. Date: 9 Jul 93 00:10:27 GMT
  967.  
  968.  
  969. The new Think C Project Manager allows for extentions, like a C compiler, C++
  970. compiler, etc. I have an stand alone assembler that I would like to put into
  971. this enviroment. Were can I get technical documentation on how to write an
  972. extention?
  973.  
  974. Aloha,
  975. Steve Hales
  976.  
  977. HALESTORM, Incorporated
  978. 
  979. 
  980. Path: ucivax!gateway
  981. From: chuck_shavit@ksr.com (Chuck Shavit)
  982. Subject: SourceServer Bug
  983. Message-ID: <9307090300.AA09808@kaos.ksr.com>
  984. Newsgroups: fa.think-c
  985. Lines: 7
  986. Date: 9 Jul 93 02:58:58 GMT
  987.  
  988. This may seem insignificant compared to the other SC++ bugs, but here it is
  989. anyway.  The SourceServer produces some funny error messages at times and
  990. refuse to do things like create a new ProjectDB, or check stuff in.  After
  991. spending some time on it, I found that it happens when the pathname of the DB
  992. file has a ' (quote) in it, e.g. if the pathname is Joe's:proj1:my_stuff.
  993.  
  994. Chuck Shavit
  995. 
  996. 
  997. Path: ucivax!gateway
  998. From: johan@teracons.com (Johan Strandberg)
  999. Subject: Re: SourceServer Bug
  1000. Message-ID: <9307090429.AA04267@teracons.com>
  1001. Newsgroups: fa.think-c
  1002. Lines: 36
  1003. Date: 9 Jul 93 04:28:25 GMT
  1004.  
  1005. >This may seem insignificant compared to the other SC++ bugs, but here it is
  1006. >anyway.  The SourceServer produces some funny error messages at times and
  1007. >refuse to do things like create a new ProjectDB, or check stuff in.  After
  1008. >spending some time on it, I found that it happens when the pathname of the DB
  1009. >file has a ' (quote) in it, e.g. if the pathname is Joe's:proj1:my_stuff.
  1010. >
  1011. >Chuck Shavit
  1012.  
  1013. You need to quote the name for source server if that's the case.  Try
  1014. something like
  1015.  
  1016.         Joe@'s:proj1:my_stuff
  1017.  
  1018. where @ is the option-d character.  I'm not sure of the exact rules, but
  1019. something along those lines might work.
  1020.  
  1021. In general the SourceServer documentation is lousy in my opinion, I have a
  1022. bunch of code that talks AppleEvents directly to it and there is *no* way
  1023. you can be expected to figure out what SourceServer needs in the event
  1024. strewam from the provided documentation.  For example, to send something
  1025. like:
  1026.  
  1027.         mountproject mydisk:myproject:
  1028.  
  1029. you need to send a list containing "mountproject" and "mydisk:myproject:"
  1030. as separate entries, but just not normal strings but null terminated
  1031. C-style strings.  If you know AppleEvents this is *weird*.  What's even
  1032. kinkier that even though the data stream is nicley tokenized -- as
  1033. described above -- SourceServer *still* needs quotes and stuff to handle
  1034. special characters.
  1035.  
  1036. Just a pain, that's all...
  1037.  
  1038.  
  1039. --johan
  1040.  
  1041. 
  1042. 
  1043. Path: ucivax!gateway
  1044. From: LAWA%IAPE.AFRC.AC.UK@ib.rl.ac.uk (Big Nose)
  1045. Subject: MenuBars/popupmenus and hook routines
  1046. Via: UK.AC.AFRC.IAPE;  9 JUL 93  9:09:27 BST
  1047. Message-ID: <9307090108.aa02809@q2.ics.uci.edu>
  1048. Newsgroups: fa.think-c
  1049. Lines: 22
  1050. Date: 9 Jul 93 08:08:28 GMT
  1051.  
  1052.  
  1053. Dear All,
  1054.  
  1055. For various reasons, I need to use several popupmenus from a patch I am
  1056. writing. I would like them to behave like a normal menu bar, cf the
  1057. menus that Boomerang or Directory Assistance put into the SF Dialog. I
  1058. thought that I could use PopUpMenuSelect and use the MenuHook procedure
  1059. to determine when control from one menu should be aborted and passed on
  1060. to a different one i.e. when the user moves from one menu title in the bar
  1061. to the next, without releasing the mouse. Unfortunately, from what I can
  1062. determine, PopUpMenuSelect doesn't seem to call the MenuHook routine.
  1063.  
  1064. Anyone suggest how I can get round this. Is there a PopUpMenuHook routine
  1065. that is different from the standard MenuHook?, can I patch the Menu Manager
  1066. to draw a menu bar somewhere other than at the top of the screen? Does
  1067. patching SystemEvent (or similar) and posting fake mouseUp/mouseDown
  1068. combinations make the most sense?
  1069.  
  1070. Thanks,
  1071.  
  1072. Andy Law
  1073. ( LAWA @ iape.afrc.ac.uk                        Big Nose in Edinburgh )
  1074. 
  1075. 
  1076. Path: ucivax!gateway
  1077. From: k.c.quick@open.ac.uk (Kevin Quick)
  1078. Subject: Appmaker Updater
  1079. Via: uk.ac.open; Fri, 9 Jul 1993 11:59:57 +0100
  1080. X-Sender: kc_quick@sunflower
  1081. Message-ID: <9307091102.AA24889@sunflower.open.ac.uk>
  1082. X-Mailer: Eudora 1.3.1
  1083. Newsgroups: fa.think-c
  1084. Lines: 25
  1085. Date: 9 Jul 93 11:02:01 GMT
  1086.  
  1087. Does anyone have the full Appmaker upgrade 1.5.2 > 1.5.4 for Symantec C
  1088. 6.00. Someone did try to post it to Sumex but only included the
  1089. application, not the files that go with it.
  1090.  
  1091. If the update cost money can someone let me know the price.
  1092.  
  1093. As I've now got my SC++ upgrade I would like to continue to use this app as
  1094. well.
  1095.  
  1096. TIA
  1097.  
  1098.  ****************************************************************************
  1099.  *                                                                          *
  1100.  *  Kevin Quick                                                             *
  1101.  *  Computer Support Engineer          Telephone    0908 653961 (DDI)       *
  1102.  *  The Open University                Fax          0908 653658             *
  1103.  *  Faculty of Technology              EMail        k.c.quick@open.ac.uk    *
  1104.  *  Venables Building                                                       *
  1105.  *  Walton Hall                                                             *
  1106.  *  MK7 6AA                                                                 *
  1107.  *  England                                                                 *
  1108.  *                                                                          *
  1109.  ***************************************************************************
  1110. *
  1111.  
  1112. 
  1113. 
  1114. Path: ucivax!gateway
  1115. From: phils@bedford.symantec.com (Phil Shapiro)
  1116. Subject: Re: Think 6.0 Extentions Technical info
  1117. X-Sender: phils@stimpy.symantec.com
  1118. Message-ID: <9307091603.AA07403@grumpy.symantec.com>
  1119. Newsgroups: fa.think-c
  1120. Lines: 21
  1121. Date: 9 Jul 93 16:02:28 GMT
  1122.  
  1123. >The new Think C Project Manager allows for extentions, like a C compiler, C++
  1124. >compiler, etc. I have an stand alone assembler that I would like to put into
  1125. >this enviroment. Were can I get technical documentation on how to write an
  1126. >extention?
  1127.  
  1128. If you are interested in writing a THINK Translator (like a compiler or
  1129. assembler), you should send an email to the Product Manager, David Allcott,
  1130. at:  ALLCOTT.D@AppleLink.apple.com
  1131.  
  1132. You should also contact him if you're interested in writing an External
  1133. Editor that works with the THINK Project Manager, or if you're interested
  1134. in taking advantage of the built in editor hooks that the THINK editor
  1135. supports.
  1136.  
  1137.         -phil
  1138. --
  1139.    Phil Shapiro                                   Software Engineer
  1140.    Language Products Group                     Symantec Corporation
  1141.                  Internet: phils@bedford.symantec.com
  1142.                       "relatively inexperienced"
  1143.  
  1144. 
  1145. 
  1146. Path: ucivax!gateway
  1147. From: bwilliam@cs.gmu.edu (Brian Williams)
  1148. Subject: Dagnabit_ResFiles
  1149. Message-ID: <9307091640.AA05884@cs.gmu.edu>
  1150. Newsgroups: fa.think-c
  1151. Lines: 38
  1152. Date: 9 Jul 93 16:44:47 GMT
  1153.  
  1154.  
  1155. Hello all,
  1156.  
  1157. I am having a problem with resource files.  I am running myproj.pi
  1158. (TC 5.0), and would like to open temp.pi.rsrc to get a picture
  1159. and print it. Here is what I tried...
  1160.  
  1161.     Str255 resfile;
  1162.     int refNum, res_id, error;
  1163.     PicHandle thePicture;
  1164.  
  1165.  
  1166.     strcpy (resfile, "temp.pi.rsrc");
  1167.     CtoPstr (resfile);
  1168.     refNum = OpenResFile (resfile);
  1169.     if (refNum == -1)
  1170.     {
  1171.         errmessage :  cannot open file
  1172.     }
  1173.  
  1174.     UseResFile (refNum);
  1175.     error = ResError ();
  1176.     if (error != noErr)
  1177.     {
  1178.         errmessage :  resError = ...
  1179.     }
  1180.     thePicture = GetPicture (res_id);
  1181.  
  1182.     /* print the picture */
  1183.  
  1184. When I run, I do not receive any error messages, just a blank picture.
  1185. When I copied the picture from temp.pi.rsrc into myproj.pi.rsrc,
  1186. everything was fine. Any help would be appreciated.
  1187.  
  1188. Brian
  1189.  
  1190. bwilliam@cs.gmu.edu
  1191.  
  1192. 
  1193. 
  1194. Path: ucivax!gateway
  1195. From: bwilliam@cs.gmu.edu (Brian Williams)
  1196. Subject: RE_Dagnabit_ResFIles
  1197. Message-ID: <9307111546.AA11562@cs.gmu.edu>
  1198. Newsgroups: fa.think-c
  1199. Lines: 11
  1200. Date: 11 Jul 93 15:51:10 GMT
  1201.  
  1202.  
  1203. "Where there's a whip, there's a way?" No,
  1204. "Where there's a whip, there's a dimwit."
  1205.  
  1206. I forgot to reset the port to the printer after those frappin error
  1207. messages.
  1208.  
  1209. I'd like to thank Jim Wintermyre for his responce.
  1210.  
  1211. Brian
  1212.  
  1213. 
  1214. 
  1215. Path: ucivax!gateway
  1216. From: jimlynch@netcom.com (Jim Lynch)
  1217. Subject: Re:  Think C 6.0
  1218. Message-ID: <9307120946.AA06850@netcom2.netcom.com>
  1219. Newsgroups: fa.think-c
  1220. Lines: 24
  1221. Date: 12 Jul 93 09:46:30 GMT
  1222.  
  1223. Hey Symantec! This one drives me up the wall!!
  1224.  
  1225. kirk_crawford@qmail2.aero.org sed:
  1226. >>>>>
  1227. When I open a project file with it, it does not set the directory that standard
  1228. file uses to the directory with the project in it.
  1229. <<<<<
  1230.  
  1231. Now, I _do_ have uses for getting the think tree, but I want my source files
  1232. to always be available easily.
  1233.  
  1234. Here's a suggested solution: Have a pair of radio buttons in a custom file
  1235. open box. One's title is "Project Tree" and the other is "Compiler Tree".
  1236. The project tree radio is the one selected after opening a project, and when
  1237. opening a file, the directory displayed is the one containing the prevously
  1238. opened project. When navigating, things happen as usual. When somehow
  1239. dismissing the dialog, it remembers the directory for next time as usual.
  1240.  
  1241. When the user selects the other radio, it saves the directory location into
  1242. a space designated and displays the Think tree.
  1243.  
  1244. Simpler suggestion (that might be less confusing: Same idea, nothing gets
  1245. saved and the radios are standard buttons that work like the 'Desktop'
  1246. button.
  1247. 
  1248. 
  1249. Path: ucivax!gateway
  1250. From: k059509@hobbes.kzoo.edu ("Jason A. Bobier")
  1251. Subject: missing functions
  1252. Message-ID: <9307121407.AA24826@hobbes.kzoo.edu>
  1253. X-Mailer: ELM [version 2.3 PL11]
  1254. Newsgroups: fa.think-c
  1255. Lines: 28
  1256. Date: 12 Jul 93 14:04:15 GMT
  1257.  
  1258. Hi, before I declare a bug in the iostreams for Symantec C++ perhaps someone
  1259. can tell me where to find the functions hex() and oct() which according to
  1260. Stroustrup are supposed to be declared in the iostream.h.
  1261.  
  1262. I was trying to implement a program in his book that went like this, and all
  1263. I could get was errors.
  1264.  
  1265. #include <stream.h>
  1266. #include <string.h>
  1267.  
  1268. main()
  1269. {
  1270.     char chdr = 'a';
  1271.  
  1272.     cout << int(chdr) << " = "
  1273.         << oct(chdr) << " = "
  1274.         << hex(chdr) << "\n";
  1275.  
  1276. }
  1277.  
  1278. This is actually a shortened version of the program. It is in chapter 2 I
  1279. think. In any case, the int() function works but the other two don't.
  1280.  
  1281. Thanx,
  1282. Jason A. Bobier
  1283. k059509@kzoo.edu
  1284.  
  1285. 'Living is easy with eyes closed' -The Beatles
  1286. 
  1287. 
  1288. Path: ucivax!gateway
  1289. From: tla@crl.com (Troy Anderson)
  1290. Subject: missing functions
  1291. Message-ID: <Pine.3.05.9307122351.A20537-a100000@crl.crl.com>
  1292. Content-Type: TEXT/PLAIN; charset=US-ASCII
  1293. Mime-Version: 1.0
  1294. Newsgroups: fa.think-c
  1295. Lines: 31
  1296. Date: 13 Jul 93 06:12:28 GMT
  1297.  
  1298. k059509@kzoo.edu wrote:
  1299. >>>>>
  1300. perhaps someone can tell me where to find the functions hex() and oct()
  1301. which according to Stroustrup are supposed to be declared in the iostream.h.
  1302.  
  1303.         cout << int(chdr) << " = "
  1304.                 << oct(chdr) << " = "
  1305.                 << hex(chdr) << "\n";
  1306. <<<<<
  1307. oct and hex are included with the Symantec C++ compiler.  They are defined
  1308. to take and return a reference to an iostream, and are declared as follows:
  1309.  
  1310. ios& oct(ios&);
  1311. ios& hex(ios&);
  1312.  
  1313. so you can use them like this:
  1314.  
  1315. cout << oct << chdr << " = "
  1316.      << hex << chdr << "\n";
  1317.  
  1318. as for the int(chdr) part, that creates a temporary int and initializes it
  1319. to have the value of chdr.  That is a result of C++'s built in constructor
  1320. for the int class.
  1321.  
  1322. Section 10.4.2.1 Standard I/O Manipulators in Stroustrup shows an example
  1323. of this.
  1324.  
  1325. -Troy
  1326.  
  1327.  
  1328.  
  1329. 
  1330. 
  1331. Path: ucivax!gateway
  1332. From: arentz@indy.knoware.nl (Stefan Arentz)
  1333. Subject: Summary: Popup Menus and _TrackControl
  1334. X-Sender: arentz@pop.knoware.nl
  1335. Message-ID: <9307141508.AA05183@indy.knoware.nl>
  1336. Newsgroups: fa.think-c
  1337. Lines: 35
  1338. Date: 14 Jul 93 14:08:01 GMT
  1339.  
  1340. The Problem:
  1341. ------------
  1342.  
  1343. If you install a popup menu control, using the standard System Seven CDEF
  1344. (ID = 1008), then the following code doesn't pop up the menu:
  1345.  
  1346.      thePart = TrackControl(theControl, localMouse, nil);
  1347.  
  1348. The code does work for Buttons, Radio Buttons and Checkboxes.
  1349.  
  1350. The Solution:
  1351. -------------
  1352.  
  1353. MPW 411 says:
  1354.  
  1355.      "If actionProc is POINTER(-1), TrackControl looks in the control record
  1356.      for a pointer to the control's default action procedure. If that field
  1357.      of the control record contains a procedure pointer, TrackControl uses
  1358.      the action procedure it points to; if the field contains POINTER (-1),
  1359.      TrackControl calls the control definition function to perform the
  1360.      necessary action. (If the field contains NIL, TrackControl does nothing.)"
  1361.  
  1362. So, if you pass (ProcPtr)-1 to the actionProc parameter of _TrackControl
  1363. everything works fine.
  1364.  
  1365.      thePart = TrackControl(theControl, localMouse, (ProcPtr)-1);
  1366.  
  1367. Yeah! Nasty!
  1368.  
  1369. -- Stefan
  1370.  
  1371.  
  1372. ----------------------------------------------------------------------------
  1373. Stefan Arentz          -  Software Constructor  -          arentz@knoware.nl
  1374.  
  1375. 
  1376. 
  1377. Path: ucivax!gateway
  1378. From: arentz@indy.knoware.nl (Stefan Arentz)
  1379. Subject: Writing ResEdit Editors
  1380. X-Sender: arentz@pop.knoware.nl (Unverified)
  1381. Message-ID: <9307142204.AA06208@indy.knoware.nl>
  1382. Newsgroups: fa.think-c
  1383. Lines: 17
  1384. Date: 14 Jul 93 21:03:44 GMT
  1385.  
  1386. Hello World,
  1387.  
  1388. I am writing a ResEdit editor to edit the XDTL resources of my Dialog
  1389. Manager Library. I am having some problems with testing (not debugging) the
  1390. editor. If I want to test it, I have to build a code resource, quit
  1391. ResEdit, copy the resource to the 'ResEdit Preferences' file, start ResEdit
  1392. and finally run the editor.
  1393.  
  1394. Is there an easier way to do this ?!
  1395.  
  1396. BTW: If this is editor is finished I will write a better DITL editor.
  1397.  
  1398. -- Stefan
  1399.  
  1400. ----------------------------------------------------------------------------
  1401. Stefan Arentz          -  Software Constructor  -          arentz@knoware.nl
  1402.  
  1403. 
  1404. 
  1405. Path: ucivax!gateway
  1406. From: malldrit@sfu.ca
  1407. Subject: File Control Blocks
  1408. Message-ID: <9307151844.AA19601@whistler.sfu.ca>
  1409. Newsgroups: fa.think-c
  1410. Lines: 12
  1411. Date: 15 Jul 93 18:45:11 GMT
  1412.  
  1413. Hello,
  1414.  
  1415. Heres questions for you all:
  1416.  
  1417. I have an application which displays the open files on a Macintosh volume.
  1418. Does anyone know of a way of finding the process which has opened a file?
  1419. Currently I scan the open files using PBGetFCBInfo.  The FCBPBRec returned
  1420. gives no indication of the process which opened the file.
  1421.  
  1422. Thanks in advance.
  1423. -Mark
  1424.  
  1425. 
  1426. 
  1427. Path: ucivax!gateway
  1428. From: lawa%afrc.ac.uk@ib.rl.ac.uk (Big Nose)
  1429. Subject: cdev runner
  1430. Via: UK.AC.AFRC; 19 JUL 93 12:09:35 BST
  1431. Via: uk.ac.afrc.iape; Mon, 19 Jul 1993 12:13:20 +0100
  1432. Message-ID: <9307190407.aa14746@q2.ics.uci.edu>
  1433. Newsgroups: fa.think-c
  1434. Lines: 8
  1435. Date: 19 Jul 93 11:07:35 GMT
  1436.  
  1437.  
  1438. Is there a system 7.0 version of the cdev runner project available? The
  1439. version supplied with THINK C 5.0 doesn't work, and I can't find an
  1440. update in the think-c directory. Anyone know of a source?
  1441.  
  1442. Andy Law
  1443.  
  1444. (LAWA @ AFRC.AC.UK                       Big Nose in Edinburgh )
  1445. 
  1446. 
  1447. Path: ucivax!gateway
  1448. From: pfterry@msmail.kgs.ukans.edu (pfterry)
  1449. Subject: Think C Project Directory Hack
  1450. Message-ID: <9307192246.aa25182@q2.ics.uci.edu>
  1451. Newsgroups: fa.think-c
  1452. Lines: 12
  1453. Date: 20 Jul 93 05:46:33 GMT
  1454.  
  1455. A number of people have complained about the behavior of Think C's standard
  1456. open and save dialog boxes. Dave Heller wrote a hack and posted it to AOL.
  1457. Here's his description.
  1458.  
  1459. This is a very simple INIT which hacks the THINK C 6.0 editor (THINK Project
  1460. Manager) to default to the project directory like it did for THINK C 5.0.x.  I
  1461. found the new default behavior annoying, so I fixed it.  It does not modify the
  1462. THINK Project Manager application in any way. Let me know if it doesn't work
  1463. for you.
  1464.  
  1465.  
  1466. I've placed it in the incoming directory on the ThinkC site.
  1467. 
  1468. 
  1469. Path: ucivax!gateway
  1470. From: lennox@ccvax.ucd.ie
  1471. Subject: Problem with dead code stripping in MPW C++
  1472. Message-ID: <039595BA0E9F20F02D@ccvax.ucd.ie>
  1473. Newsgroups: fa.think-c
  1474. Lines: 77
  1475. Date: 20 Jul 93 08:39:39 GMT
  1476. X-Envelope-to: think-c@ics.uci.edu
  1477.  
  1478. I know this isn't a Symantec problem but I havn't got my upgrade yet so I
  1479. only have MPW C++ and it may be a problem in Symantec C++ too, so here
  1480. goes...
  1481.  
  1482. I am declaring global instances of derived classes and the linker appears
  1483. to be removing them.
  1484.  
  1485. The code below compiles and runs as expected under Borland C++ on DOS but under
  1486. MPW on Macintosh the linker strips out the classes and the globals never
  1487. get created!
  1488.  
  1489. The following is the code I'm using. _Any_ ideas on this would be appreciated.
  1490.  
  1491. Cheers,
  1492.  
  1493. Duncan Lennox
  1494.  
  1495. // Start of file "base.h"
  1496. class Base
  1497.   {
  1498.     public:
  1499.       static Base* head;
  1500.     Base* next;
  1501.     Base( void )
  1502.       {
  1503.         next = head;
  1504.         head = this;
  1505.       }
  1506.     virtual ~Base( void )
  1507.       {
  1508.         head = next;
  1509.       }
  1510.     virtual void MyNameIs( void ) = 0;
  1511.     static void ListAll( void );
  1512.   };
  1513.  
  1514. // Start of "base.cp"
  1515. #include "base.h"
  1516.  
  1517. Base* Base::head = 0;
  1518.  
  1519. void Base::ListAll( void )
  1520.   {
  1521.     Base* b = head;
  1522.     while ( b != 0 )
  1523.       {
  1524.         b->MyNameIs();
  1525.         b = b->next;
  1526.       }
  1527.   }
  1528.  
  1529. // Start of file "derived.cp"
  1530. class derived : public Base
  1531.   {
  1532.     public:
  1533.  
  1534.       void MyNameIs( void )
  1535.         {
  1536.           cout << "derived" << endl;
  1537.         }
  1538.   } TheDerived;
  1539.  
  1540. // This is what MacApp's macroDontDeadStrip would expand to (almost)
  1541. derived* dummy = new derived;
  1542.  
  1543. // Start of file "main.cp"
  1544. #include "base.h"
  1545.  
  1546. int main( void )
  1547.   {
  1548.     Base::ListAll();
  1549.     return 0;
  1550.   }
  1551. +----------------------------------------------------------------------------+
  1552. Duncan Lennox, Computer Science, U.C.D., Belfield, Dublin 4, Ireland
  1553. lennox@ccvax.ucd.ie     "The best way to accelerate Windows is at 9.81ms^-2"
  1554.  
  1555. 
  1556. 
  1557. Path: ucivax!gateway
  1558. From: lennox@ccvax.ucd.ie
  1559. Subject: Re: Problem with dead code stripping in MPW C++
  1560. Message-ID: <0390715BB35F20F4E8@ccvax.ucd.ie>
  1561. Newsgroups: fa.think-c
  1562. Lines: 22
  1563. Date: 20 Jul 93 09:17:23 GMT
  1564. X-Envelope-to: think-c@ics.uci.edu
  1565.  
  1566. >I am declaring global instances of derived classes and the linker appears
  1567. >to be removing them.
  1568.  
  1569. Typically having spent the guts of a day at this problem and gotten
  1570. nowhere, as soon as I posted a query to the net I found the answer myself!
  1571.  
  1572. If I include a "#pragma force_active on" at the start of the source code
  1573. that is getting stripped then the linker leaves it alone. This solves my
  1574. problem perfectly and the code now works as expected.
  1575.  
  1576. A case of RTFM, but its kinda buried and hard to find.
  1577.  
  1578. I would still be interested in hearing any other advice or info on this
  1579. though, but my panic is over.
  1580.  
  1581. Cheers,
  1582.  
  1583. Duncan
  1584. +----------------------------------------------------------------------------+
  1585. Duncan Lennox, Computer Science, U.C.D., Belfield, Dublin 4, Ireland
  1586. lennox@ccvax.ucd.ie     "The best way to accelerate Windows is at 9.81ms^-2"
  1587.  
  1588. 
  1589. 
  1590. Path: ucivax!gateway
  1591. From: kitchel@octopus.dpsi.com ("Sidney W. Kitchel")
  1592. Subject: Bug list
  1593. Message-ID: <9307200705.aa07932@q2.ics.uci.edu>
  1594. In-Reply-To: <039595BA0E9F20F02D@ccvax.ucd.ie> from "lennox@ccvax.ucd.ie" at Jul 20, 93 08:39:39 am
  1595. X-Mailer: ELM [version 2.4 PL0]
  1596. Content-Type: text
  1597. Content-Length: 495
  1598. Newsgroups: fa.think-c
  1599. Lines: 11
  1600. Date: 20 Jul 93 14:05:29 GMT
  1601.  
  1602.     I'm a novice at this game having just received my copy of
  1603. SC++. Would someone kindly send me mail about where I can get a copy
  1604. of the bug list, which was mentioned on one of the comp.sys.mac.* news
  1605. groups?
  1606.                         Thanks,
  1607.                             --Sid
  1608. --
  1609. Sidney W. Kitchel          kitchel@cs.indiana.edu, kitchel@dpsi.com
  1610. Data Parallel Systems, Inc.  ============||  DPSI  ||===============
  1611. 4617 E. Morningside Drive                          (812) 334-8100
  1612. Bloomington, Indiana,  47408  USA        FAX:  (812) 334-8121
  1613. 
  1614. 
  1615. Path: ucivax!gateway
  1616. From: nagel@ics.uci.edu (Mark Nagel)
  1617. Subject: ARCHIVE: Marker Control 0.60b
  1618. Message-ID: <20362.743185900@ics.uci.edu>
  1619. Newsgroups: fa.think-c
  1620. Reply-To: think-c-request@ics.uci.edu
  1621. Lines: 34
  1622. Date: 20 Jul 93 16:31:54 GMT
  1623.  
  1624. This is a new version of Marker Control, a control panel that causes
  1625. files in THINK C to be marked and their window positions saved.
  1626.  
  1627. NEW VERSION v0.6b
  1628.   % Fixed a bug where if you had the "Only Mark Files Newer Than:"
  1629.     option OFF and moved a window without making any changes to it,
  1630.     it set the modified date of the associated file to some time
  1631.     in the early 1900s.
  1632.   % Made it so that window positions and sizes are saved even if
  1633.     you close the windows with "Close All" or by quitting THINK C.
  1634.     Before, they were only saved if you actually used "Close" from
  1635.     the File menu.
  1636.   % Now functions that contain function prototypes as parameters are
  1637.     marked.
  1638.  
  1639. Executive Summary
  1640. -----------------
  1641.   % Save window positions in THINK C.
  1642.   % Mark functions in source files.
  1643.   % Drop RMarker ControlS onto your System Folder and restart.
  1644.         Open the RMarker ControlS control panel to configure its operation.
  1645.   % Run THINK C and notice the difference.
  1646.       - Window positions are saved (open a file, move its window,
  1647.         close it, reopen it to try this out)
  1648.       - Command-click on the title bar of source file windows to
  1649.         see a list of the functions in that file.
  1650.   % #pragma mark <yourLabel>    // to mark things other than functions
  1651.   % #pragma markOff             // turn marking off until the end of the file or a #pragma markOn
  1652.   % #pragma markOn              // turn marking back on
  1653.  
  1654. Brought to you by Troy Anderson
  1655. tla@CRL.com
  1656.  
  1657. [saved as: /mac/think-c/compiler/marker-control-06b.hqx; 22K]
  1658. 
  1659. 
  1660. Path: ucivax!gateway
  1661. From: MONZON%SHIRE@uthscsa.edu
  1662. Subject: 3d library
  1663. Message-ID: <01H0RP3BSACI002P98@uthscsa.edu>
  1664. Content-transfer-encoding: 7BIT
  1665. MIME-version: 1.0
  1666. Newsgroups: fa.think-c
  1667. X-VMS-To: APO"think-c@ics.uci.edu"
  1668. Organization: University of Texas Health Science Center at San Antonio
  1669. Lines: 1
  1670. Date: 20 Jul 93 19:44:55 GMT
  1671. X-Envelope-to: think-c@ics.uci.edu
  1672.  
  1673. has anyone used the 3d graph library that comes with think-c? i'm looking for source code examples that uses the library.
  1674. 
  1675. 
  1676. Path: ucivax!gateway
  1677. From: MONZON%SHIRE@uthscsa.edu
  1678. Subject: default window to Printf
  1679. Message-ID: <01H0RQX9KTG2003RNQ@uthscsa.edu>
  1680. Content-transfer-encoding: 7BIT
  1681. MIME-version: 1.0
  1682. Newsgroups: fa.think-c
  1683. X-VMS-To: APO"think-c@ics.uci.edu"
  1684. Organization: University of Texas Health Science Center at San Antonio
  1685. Lines: 1
  1686. Date: 20 Jul 93 20:39:06 GMT
  1687. X-Envelope-to: think-c@ics.uci.edu
  1688.  
  1689. i would like to use the PRINTF function to display some variables without havingto create a window first. does think-c provides a default window in which to work in. if so what is the command to display the window, i.e FOPEN(*,"rw")...)?
  1690. 
  1691. 
  1692. Path: ucivax!gateway
  1693. From: pfterry@msmail.kgs.ukans.edu (pfterry)
  1694. Subject: RE: Think C Project Directory Hack
  1695. Message-ID: <9307210702.aa27191@q2.ics.uci.edu>
  1696. Newsgroups: fa.think-c
  1697. Lines: 27
  1698. Date: 21 Jul 93 14:02:18 GMT
  1699.  
  1700. Lindsay and others,
  1701.  
  1702. >> A number of people have complained about the behavior of Think C's standard
  1703. >> open and save dialog boxes. Dave Heller wrote a hack and posted it to AOL.
  1704. >> Here's his description.
  1705. >>
  1706. >> This is a very simple INIT which hacks the THINK C 6.0 editor (THINK Project
  1707. >> Manager) to default to the project directory like it did for THINK C 5.0.x.
  1708.  
  1709. >> I
  1710. >> found the new default behavior annoying, so I fixed it.  It does not modify
  1711. >> the
  1712. >> THINK Project Manager application in any way. Let me know if it doesn't work
  1713. >> for you.
  1714. >>
  1715. >>
  1716. >> I've placed it in the incoming directory on the ThinkC site.
  1717.  
  1718. >Hmm, I obviously am looking in the wrong place, _which_ site are you referring
  1719. >to?
  1720.  
  1721. Sorry I was so vagure. You'll find it on ics.uci.edu in the directory
  1722. /mac/thinkc/compiler/ and it's name is TPMSF_Hack.sit.
  1723.  
  1724. Fred Terry
  1725.  
  1726.  
  1727. 
  1728. 
  1729. Path: ucivax!gateway
  1730. From: tla@crl.com (Troy Anderson)
  1731. Subject: Re: default window to Printf
  1732. Message-ID: <Pine.3.05.9307210826.A14469-a100000@crl.crl.com>
  1733. In-Reply-To: <01H0RQX9KTG2003RNQ@uthscsa.edu>
  1734. Content-Type: TEXT/PLAIN; charset=US-ASCII
  1735. Mime-Version: 1.0
  1736. Newsgroups: fa.think-c
  1737. Lines: 22
  1738. Date: 21 Jul 93 16:01:59 GMT
  1739.  
  1740.  
  1741. On 20 Jul 1993 MONZON%SHIRE@uthscsa.edu wrote:
  1742.  
  1743. > i would like to use the PRINTF function to display some variables
  1744. without havingto create a window first. does think-c provides a default
  1745. window in which to work in. if so what is the command to display the
  1746. window, i.e FOPEN(*,"rw")...)?
  1747. <
  1748.  
  1749. You don't have to call anythingh before printf.  As long as you have ANSI
  1750. in your project, just call printf.  The first time you call anything that
  1751. sends something to stdout or stderr or requests something from stdin, the
  1752. window is opened and you're in business.  A word of caution, it's not a
  1753. good idea to use standard quickdraw calls while you are using the ANSI
  1754. window.  That means, you either do all the work yourself - NewWindow,
  1755. DrawString, etc, or you let the ANSI library do all the work - printf,
  1756. etc.  You can, however, use sprintf any time you like.
  1757.  
  1758. Hope this helps,
  1759. Troy
  1760.  
  1761.  
  1762. 
  1763. 
  1764. Path: ucivax!gateway
  1765. From: MOGRAY@murray.fordham.edu
  1766. Subject: Serial Printing
  1767. Message-ID: <930721174243.21403388@MURRAY.FORDHAM.EDU>
  1768. Newsgroups: fa.think-c
  1769. Lines: 11
  1770. Date: 21 Jul 93 21:42:58 GMT
  1771.  
  1772.  
  1773. Does anyone know of a printer driver for System 7 that prints in plain old-
  1774. fashioned ascii, without any control characters, like an old line-printer
  1775. on the VAX or PC?
  1776.  
  1777. Also, anyone with tips about converting a non-mac serial printer to mac use
  1778. would be greatly appreciated.
  1779.  
  1780. mogray@murray.fordham.edu
  1781. Fordham University
  1782. Bronx,  New York
  1783. 
  1784. 
  1785. Path: ucivax!gateway
  1786. From: vthrc@mailbox.uq.oz.au (Danny Thomas)
  1787. Subject: Re: Serial Printing
  1788. X-Sender: vthrc@mailbox.uq.oz.au
  1789. Message-ID: <9307211541.aa15873@q2.ics.uci.edu>
  1790. Newsgroups: fa.think-c
  1791. Lines: 46
  1792. Date: 21 Jul 93 22:41:11 GMT
  1793.  
  1794. >Does anyone know of a printer driver for System 7 that prints in plain old-
  1795. >fashioned ascii, without any control characters, like an old line-printer
  1796. >on the VAX or PC?
  1797. >
  1798. >Also, anyone with tips about converting a non-mac serial printer to mac use
  1799. >would be greatly appreciated.
  1800. You could look at Chuck's Printer Drivers on Sumex-aim which support
  1801. Epson-type printers in both 'ASCII' and graphics modes. I have played
  1802. around a little with it but have noticed the following problems which I
  1803. haven't yet reported to Chuck. System 7.1 on an LC connected to Epson FX80:
  1804. (1) when printing from Word 4.0d (haven't tried other versions), you seem
  1805. to get a crash when operating in the graphics modes. The text mode seems
  1806. fine, except you have to set narrower margins so lines don't wrap
  1807. (2) it doesn't seem to work from within VersaTerm 4.xx (not sure of our
  1808. version right now). This is our real need cause we run a terminal session
  1809. to an accounting system and want it print out order forms (impact printer
  1810. for carbon copies). We have set up VersaTerm to use the Chosen printer, and
  1811. Finder prints OK to the Epson. No problems are reported but nothing comes
  1812. out of the printer, whether or not Chuck's print spooler is active.
  1813.  
  1814.  
  1815. cheers,
  1816. Danny Thomas.
  1817.  
  1818. PS I used Archie to locate Daisy 1.1 but I can't remember where from
  1819. from info-mac (sumex-aim.stanford.edu) but mirrored around the world:
  1820.      65394 17 Jun 93 ./prn/chucks-printer-driver-110.hqx
  1821.  
  1822.  
  1823.  
  1824. ================= EXCERPT FROM DOC FILE ==============================
  1825. What?
  1826. "Chuck's Printer Driver" is a printer driver -- chooser device for using
  1827. Epson dot-matrix printers (and compatibles) with your Macintosh computer.
  1828. It has been tested on a Macintosh SE and a Macintosh IIci (systems 6.0.5
  1829. through 7.1, English and Kanji versions), with a Panasonic KX-P1080i
  1830. printer.  It prints in Text (draft or NLQ) mode and Graphics (Low, Medium,
  1831. and High) modes.  It is Freeware, however I do request a small donation
  1832. ($20 U.S.) to help pay for my costs.  I would like to hear what you think
  1833. of it, and what I should add, even if you don't send me money.  Note: There
  1834. are still bugs in the text printing option,  but the graphics modes should
  1835. work fine. (I really don't want to support text printing that much, there
  1836. is a better public-domain printer driver already that does a good job of
  1837. that called "Daisy".)
  1838.  
  1839.  
  1840. 
  1841. 
  1842. Path: ucivax!gateway
  1843. From: sjm@ptltd.com (Steve Morris)
  1844. Subject: Re: Serial Printing
  1845. Message-ID: <9307212313.AA01894@comanche.ptltd.com>
  1846. In-Reply-To: <930721174243.21403388@MURRAY.FORDHAM.EDU> (MOGRAY@murray.fordham.edu)
  1847. Newsgroups: fa.think-c
  1848. Lines: 14
  1849. Date: 21 Jul 93 23:09:10 GMT
  1850.  
  1851.  
  1852. PowerPrint connects just about any printer to a Mac serial port. It actually
  1853. connects to a parallel port on the printer. The conversion is done in the
  1854. cable connector. It's cute and I have been very satisfied with mine connected
  1855. to a Lexmark 4029 with PCL 5 cartridge (our code in the cartridge of course.)
  1856. It basically connects anything which is compatable with Epson, Proprinter, HP
  1857. and something else that I don't recall.
  1858.  
  1859. Steve Morris
  1860. <steve_morris@ptltd.com>
  1861. Phoenix Technologies LTD
  1862. 38 Sidney Street
  1863. Cambridge, MA 02135
  1864. (617) 551-5042
  1865. 
  1866. 
  1867. Path: ucivax!gateway
  1868. From: pfterry@msmail.kgs.ukans.edu (pfterry)
  1869. Subject: FW: Think C Project Directory Hack
  1870. Message-ID: <9307212134.aa13170@q2.ics.uci.edu>
  1871. Newsgroups: fa.think-c
  1872. Lines: 12
  1873. Date: 22 Jul 93 04:34:12 GMT
  1874.  
  1875.  
  1876. > Sorry I was so vagure. You'll find it on ics.uci.edu in the directory
  1877. > /mac/thinkc/compiler/ and it's name is TPMSF_Hack.sit.
  1878.  
  1879. For those of you with automatic file-retrieval software, that's:
  1880.  
  1881.     ics.uci.edu:/mac/think-c/compiler/TPMSF_Hack.hqx
  1882.  
  1883. --
  1884.  Pete Gontier // EC Technology // gurgle@netcom.com
  1885.  
  1886. forwarded
  1887. 
  1888. 
  1889. Path: ucivax!gateway
  1890. From: nagel@ics.uci.edu (Mark Nagel)
  1891. Subject: ARCHIVE: File Dropper 1.1b2
  1892. Message-ID: <18500.743320454@ics.uci.edu>
  1893. Newsgroups: fa.think-c
  1894. Reply-To: nagel@ics.uci.edu
  1895. Lines: 52
  1896. Date: 22 Jul 93 05:54:23 GMT
  1897.  
  1898. File Dropper 1.1b2
  1899. Written by Troy Anderson
  1900.  
  1901. Copyright (c) 1992-1993, Troy Anderson; All Rights Reserved
  1902.  
  1903. What Is This Thing?
  1904.  
  1905. File Dropper is a THINK C 6.0 library that implements an application that you
  1906. can drop files or folders onto to do batch operations on.  It handles the
  1907. getting of the AppleEvents if running under System 7, the main event loop, and
  1908. the menus.  You need only write the code that acts on the individual files.
  1909.  
  1910. New with version 1.1b2:
  1911. o  Built "File Dropper " in THINK C 6.0
  1912. o  The cursor is NOT reset to an arrow after each call to SetStatusPercentage.
  1913. o  If you return FALSE from the eStartup, eSFInitialize, or eAEInitialize
  1914.    messages, File Dropper  will send you an eQuitting message and quit the
  1915.    application.
  1916. o  If you return FALSE from the eValidate message, File Dropper will skip any
  1917.    remaining files in the current batch.
  1918. o  If you return FALSE from an eDispose message, File Dropper will send you an
  1919.    eQuitting message and quit the application.  Returning TRUE from an eDispose
  1920.    message will cause File Dropper to continue running.  This behavior does NOT
  1921.    depend upon which of eSFInitialize or eAEInitialize was sent to you.
  1922. o  If you return TRUE from an eQuitting message, the File Dropper quits.  On the
  1923.    other hand, if  you return FALSE from an eQuitting message, File Dropper
  1924.    will quit.
  1925. o  If you want the source code to File Dropper, send me money (see the end of
  1926.    this document).
  1927. o  Added an eUserCancelled message for when the user clicks Cancel in the status
  1928.    box.
  1929. o  Added an eIdle message.
  1930. o  Added the ChangeStatusMessage function that lets you change the message in the
  1931.    status dialog on the fly, during your processing of the file.
  1932. o  Changed some things internally, so you can NOT call
  1933.    InstallCustomGetFSSpecFunc, InstallCustomFileFilterFunc, or
  1934.    InstallCustomDialogHookFunc from an eSFInitialize or  eAEInitialize message
  1935.    any more, just from eStartup.
  1936. o  Fixed a bug in the ErrorAlert function so that text relating to the error as
  1937.    well as the word "Error." show up in the dialog.
  1938. o  Made it simpler to support AboutBox functionality.  You just put text in STR#
  1939.    resource 129, and it will be displayed in the warp stars.  To enable this
  1940.    feature, return TRUE from the  eDoAboutBox message.
  1941.  
  1942.  
  1943. New with version 1.1b1:
  1944. o  You specify if you want the status dialog displayed while you are
  1945. working on the file. Progress bar like Finder 7's that you update by
  1946. specifying how far you are along with a percentage (0 - 100).  You
  1947. specify if you want this, too.
  1948.  
  1949. [saved as: /mac/think-c/code/file-dropper-11b1.hqx; 70K]
  1950. 
  1951. 
  1952. Path: ucivax!gateway
  1953. From: nagel@ics.uci.edu (Mark Nagel)
  1954. Subject: ARCHIVE: TPM SF Hack
  1955. Message-ID: <18578.743320524@ics.uci.edu>
  1956. Newsgroups: fa.think-c
  1957. Reply-To: nagel@ics.uci.edu
  1958. Lines: 15
  1959. Date: 22 Jul 93 05:55:35 GMT
  1960.  
  1961. From: pfterry@msmail.kgs.ukans.edu (pfterry)
  1962. Subject: Think C Project Directory Hack
  1963. Date: 20 Jul 93 05:46:33 GMT
  1964.  
  1965. A number of people have complained about the behavior of Think C's standard
  1966. open and save dialog boxes. Dave Heller wrote a hack and posted it to AOL.
  1967. Here's his description.
  1968.  
  1969. This is a very simple INIT which hacks the THINK C 6.0 editor (THINK Project
  1970. Manager) to default to the project directory like it did for THINK C 5.0.x.  I
  1971. found the new default behavior annoying, so I fixed it.  It does not modify the
  1972. THINK Project Manager application in any way. Let me know if it doesn't work
  1973. for you.
  1974.  
  1975. [saved as: /mac/think-c/compiler/TPMSF_Hack.hqx; 17K]
  1976. 
  1977. 
  1978. Path: ucivax!gateway
  1979. From: ejs1@tower.york.ac.uk ("Edmund J. Sutcliffe")
  1980. Subject: Re: Serial Printing
  1981. Message-ID: <Pine.3.07.9307220822.B22059-a100000@tower.york.ac.uk>
  1982. In-Reply-To: <930721174243.21403388@MURRAY.FORDHAM.EDU>
  1983. Content-Type: TEXT/PLAIN; charset=US-ASCII
  1984. Mime-Version: 1.0
  1985. Newsgroups: fa.think-c
  1986. Lines: 28
  1987. Date: 22 Jul 93 07:19:50 GMT
  1988.  
  1989.  
  1990. There is a printer app called daisy which does just that.
  1991.     Edmund
  1992. ===============================================================================
  1993. Edmund J. Sutcliffe                                   Phone +44 (0)904 433809
  1994. Computing Service,                                    Fax   +44 (0)904 433740
  1995. University of York,
  1996. Heslington,                                  Internet Mail: edmund@york.ac.uk
  1997. York, YO1 5DD U.K.
  1998.  
  1999.  
  2000.  
  2001. On 21 Jul 1993 MOGRAY@murray.fordham.edu wrote:
  2002.  
  2003. >
  2004. > Does anyone know of a printer driver for System 7 that prints in plain old-
  2005. > fashioned ascii, without any control characters, like an old line-printer
  2006. > on the VAX or PC?
  2007. >
  2008. > Also, anyone with tips about converting a non-mac serial printer to mac use
  2009. > would be greatly appreciated.
  2010. >
  2011. > mogray@murray.fordham.edu
  2012. > Fordham University
  2013. > Bronx,  New York
  2014.  
  2015.  
  2016.  
  2017. 
  2018. 
  2019. Path: ucivax!gateway
  2020. From: mauricio@mozart.aero.ufl.edu
  2021. Subject: The novel goes on (Was Re: Help reading data from file)
  2022. Message-ID: <9307221743.AA13111@mozart.aero.ufl.edu>
  2023. Newsgroups: fa.think-c
  2024. Lines: 190
  2025. X-Mts: smtp
  2026. Date: 22 Jul 93 17:44:14 GMT
  2027.  
  2028.     First, thanks for the sample code Johan!  That helped me to
  2029. begin to understand once more how C works.  I wrote my code (well,
  2030. *most* of the routine to read/convert/write files), but when I try
  2031. to run it, its spits out garbage.  Here is the code:
  2032.  
  2033.  
  2034. ------------------------------ File convert2SI.c --------------------------
  2035. #include "convertSI.h"
  2036. #include <stdio.h>
  2037. #include <ctype.h>
  2038.  
  2039. /**************************************************************************
  2040.  *
  2041.  *    Function that reads in the contents of the file inFile, converts it to
  2042.  *    SI, and writes the result to outputFile.
  2043.  *
  2044.  *    Parts based (stolen?) on sample code provided by Johan Strandberg.
  2045.  *
  2046.  *    Last Modified in 21/07/1993
  2047.  *
  2048.  **************************************************************************/
  2049. int convert2SI (inputFile, outputFile)
  2050.  
  2051. char *inputFile;
  2052. char *outputFile;
  2053.  
  2054. {
  2055.     FILE    *in;        /* File pointer to the input file */
  2056.     FILE    *out;        /* File pointer to the output file */
  2057.     int        err;        /* To store temporary error values */
  2058.     int        lettre;        /* Make sure it's an int! */
  2059.     int        status;
  2060.     char    OutString[100];    /* Place to put the strings */
  2061.     int        StringCnt = 0;        /* keeps track to the
  2062. position in OutString */
  2063.  
  2064.      /*
  2065.      * Open InputFile
  2066.      */
  2067.     errno = 0; /* All OK */
  2068.     in = fopen(inputFile, "r");
  2069.     if (errno) {
  2070.         return errno;
  2071.     }
  2072.  
  2073.     /*
  2074.      * Open OutputFile
  2075.      */
  2076.     errno = 0;
  2077.     out = fopen(outputFile, "w");
  2078.     if (errno) {
  2079.         err = errno; /* save errno since fclose will scramble it */
  2080.         fclose(in);
  2081.         return err;
  2082.     }
  2083.  
  2084.  
  2085.      /* Set flag to (char, lowercase) */
  2086.      status = CharLower;
  2087.  
  2088.     /*
  2089.      * Clear string OutString.
  2090.      */
  2091.     /* While there is something to be read from InputFile */
  2092.     while ((lettre = fgetc(in)) != EOF) {
  2093.  
  2094.          /* Is lettre character (a-z A-Z)? */
  2095.         if (isalpha(lettre)) {
  2096.              /* Is flag not set to Char*? */
  2097.              if (status <10) {
  2098.                  /* Call WriteString to save contents of
  2099. OutString to OutputFile. */
  2100.                  StringCnt = WriteString(OutString, out);
  2101.                  status = CharLower; /* Reset flag to CharLower */
  2102.              } /* End if status < 10 */
  2103.  
  2104.               /* Is lettre uppercase? */
  2105.               if (isupper(lettre)) {
  2106.  
  2107.                  if (status == CharLower) { /* Is flag
  2108. set to char/lowercase? */
  2109.                     status = CharUpper; /* Set flag
  2110. to (char/uppercase) */
  2111.  
  2112.                     /* Write OpenUpper character to OutString */
  2113.                     OutString[StringCnt] = OpenUpper;
  2114.                     StringCnt++;
  2115.  
  2116.                  } /* End If status == CharLower */
  2117.  
  2118.                  /* Write lettre (lowercase) to OutString */
  2119.                  OutString[StringCnt] = tolower(lettre);
  2120.                  StringCnt++;
  2121.  
  2122.              } else if (islower(lettre)) { /* (lowercase) */
  2123.                  if (status == CharUpper) { /* Is flag
  2124. set to char/uppercase? */
  2125.                      status = CharLower; /* Set flag
  2126. to (,lowercase) */
  2127.  
  2128.                      /* Write CloseUpper character
  2129. to OutString */
  2130.                      OutString[StringCnt] = CloseUpper;
  2131.                     StringCnt++;
  2132.  
  2133.                  } /* End If status == CharUpper */
  2134.  
  2135.                  /* Write lettre  to OutString */
  2136.                  OutString[StringCnt] = lettre;
  2137.                  StringCnt++;
  2138.  
  2139.              } /* End If case */
  2140.  
  2141.         } else if (isdigit(lettre)) { /* is lettre number (0-9)? */
  2142.  
  2143.              if (status > 1) { /* Is flag NOT set to (number)? */
  2144.                  /* Call WriteString to save contents of
  2145. OutString to OutputFile. */
  2146.                  StringCnt = WriteString(OutString, out);
  2147.                  status = CharNumber; /* Set flag to (number) */
  2148.  
  2149.              } /* End If status > 1 */
  2150.  
  2151.              /* Write lettre to OutString */
  2152.              OutString[StringCnt] = lettre;
  2153.              StringCnt++;
  2154.  
  2155.         /* is lettre space, ",", etc? */
  2156.         } else if (isspace(lettre) || ispunct(lettre)) {
  2157.  
  2158.             /* Call WriteString to save contents of
  2159. OutString to OutputFile */
  2160.             StringCnt = WriteString(OutString, out);
  2161.  
  2162.             /* Write lettre to OutputFile */
  2163.             fputc (lettre, out);
  2164.  
  2165.         } /* End If */
  2166.  
  2167.     } /* End While */
  2168.  
  2169.     /* Close opened files */
  2170.     fclose(in);
  2171.     fclose(out);
  2172.  
  2173.     return 0;
  2174.  
  2175. }
  2176.  
  2177. int WriteString (outstring, outfile)
  2178. char    *outstring;
  2179. FILE    *outfile;
  2180. {
  2181.     int    last_one = strlen(outstring);    /* how many characters are *
  2182.  
  2183.      * in the string?          */
  2184.     int    i;
  2185.     /* Counter for "for" loop */
  2186.  
  2187.     if (last_one >0) { /* work only for non-empty strings */
  2188.         for (i=last_one; i>=0;i--) {
  2189.             fputc (outstring[i], outfile);
  2190.         }
  2191.     }
  2192.  
  2193.     return 0; /* reset counter */
  2194.  
  2195.  
  2196. }
  2197.  
  2198. ------------------------------ File convert2SI.c --------------------------
  2199.  
  2200. The header file convertSI.h has only the values I am using for the
  2201. variables CharUpper, CharLower, CharNumber, OpenUpper, and OpenLower.
  2202. Below is the test file I created
  2203.  
  2204.  
  2205. ------------------------------ File test.in --------------------------
  2206. This is a TEst.?>  UUUU.uuu-123
  2207. ------------------------------ File test.in --------------------------
  2208.  
  2209. And here is what I got back:
  2210.  
  2211. ------------------------------ File test.out --------------------------
  2212. XDNIsih}t{ XDNIsih}si XDNIsih}sa
  2213. XDNIts}et{.XDNIts}et{?XDNIts}et{>XDNIts}et{ XDNIts}et{
  2214. XDNItuuuu{.XDNItuuuu}-XDNItuuuu}
  2215. ------------------------------ File test.out --------------------------
  2216.  
  2217. What have I done wrong?
  2218. 
  2219. 
  2220. Path: ucivax!gateway
  2221. From: aadt!atul_barve@uunet.uu.net (Atul Barve)
  2222. Subject: Managing versions of c files
  2223. X-Sender: atulb@192.9.225.3
  2224. Message-ID: <9307222141.AA00428@tears>
  2225. Newsgroups: fa.think-c
  2226. Lines: 30
  2227. Date: 23 Jul 93 00:00:23 GMT
  2228.  
  2229. hi netters,
  2230.  
  2231. I have written a simple version control system for think c. it does not
  2232. have any of the sofiticated features of source server or Projector.
  2233.  
  2234. This is what it does...
  2235.  
  2236. It allows multiple people working on a think c project, to coordinate there
  2237. development efforts. so if userA is working on file1 and userB wants to
  2238. work on the same file it will not allow you to edit it (Provided Projector
  2239. Aware flag is set). It does it thru the use of apple events and program
  2240. linking. When userA is done editing the file he checks it in. If it has
  2241. changed it copies the file to a specified directory. One advantage of this
  2242. system is that it allows you to maintain source code locally. and still
  2243. keep track of it...
  2244.  
  2245. Would such a tool be usefull ???
  2246.  
  2247. thanks,
  2248.  
  2249.  
  2250.  
  2251.  
  2252.  
  2253. Atul (!Ajay)
  2254. (atul_barve@aadt.com)
  2255.  
  2256. "Don't take life too seriously... it's not like anyone gets out of it alive."
  2257.                         -- jbk@world.std.com
  2258.  
  2259. 
  2260. 
  2261. Path: ucivax!gateway
  2262. From: vthrc@mailbox.uq.oz.au (Danny Thomas)
  2263. Subject: posting messages with enclosures
  2264. X-Sender: vthrc@mailbox.uq.oz.au
  2265. Message-ID: <9307221804.aa02984@q2.ics.uci.edu>
  2266. Newsgroups: fa.think-c
  2267. Lines: 28
  2268. Date: 23 Jul 93 01:04:16 GMT
  2269.  
  2270. >Executable binary (application) of Arashi 1.1, a vector graphics game
  2271. >that requires 256 colors or shades of gray.
  2272. >
  2273. >Juri Munkki
  2274. >jmunkki@hut.fi
  2275. >
  2276. >
  2277. >
  2278. >Attachment converted: !Download:ARASHI 1.1.sea (Type: 'APPL' Creator: 'DSEA')
  2279.  
  2280. From some of the newsgroups I subscribe to I know that numerous people have
  2281. well founded objections to people posting messages with (large) enclosures.
  2282. Some concerns include bandwidth (particularly people _paying_ for their
  2283. modem/SLIP links), possibility of virii, etc. My suggestion is to first
  2284. post a message asking whether (a) there are enough people interested in the
  2285. enclosure to make it worthwhile (b) not enough people that object, and then
  2286. make a decision whether to mail out the enclosure. Personally I think
  2287. placing these on an FTP site is a better option leaving it to people who
  2288. are interested to fetch.
  2289.  
  2290. just my 0.02c worth
  2291. Danny Thomas.
  2292.  
  2293.  
  2294. PS I'm writing this message mainly because of the size of the enclosure
  2295. (263K), and because it doesn't seem related to the purpose of this mailing
  2296. list (eg it doesn't seem to include source code).
  2297.  
  2298. 
  2299. 
  2300. Path: ucivax!gateway
  2301. From: nagel@ics.uci.edu (Mark Nagel)
  2302. Subject: ARCHIVE: Arashi 1.1 source
  2303. Message-ID: <6169.743391887@ics.uci.edu>
  2304. Newsgroups: fa.think-c
  2305. Reply-To: nagel@ics.uci.edu
  2306. Lines: 12
  2307. Date: 23 Jul 93 01:44:58 GMT
  2308.  
  2309. You probably all already know this :), but the source for Arashi 1.1
  2310. is available.  Even though it was mistakenly sent to the entire list
  2311. (Juri has already apologized, so don't roast him _too_ badly), I've
  2312. stashed a copy in the archives.
  2313.  
  2314. I figure the pain of 450+ duplicate copies is probably dulled by the
  2315. fact that Juri has made available the entire source for this very cool
  2316. game.  Thanks, Juri!
  2317.  
  2318. [saved as: /mac/think-c/appl/arashi-11.hqx; 1408K]
  2319.  
  2320. Mark
  2321. 
  2322. 
  2323. Path: ucivax!gateway
  2324. From: k059509@hobbes.kzoo.edu ("Jason A. Bobier")
  2325. Subject: missing functions (fwd)
  2326. Message-ID: <9307230519.AA16483@hobbes.kzoo.edu>
  2327. X-Mailer: ELM [version 2.3 PL11]
  2328. Newsgroups: fa.think-c
  2329. Lines: 40
  2330. Date: 23 Jul 93 05:16:40 GMT
  2331.  
  2332. > perhaps someone can tell me where to find the functions hex() and oct()
  2333. > which according to Stroustrup are supposed to be declared in the iostream.h.
  2334. >
  2335. >         cout << int(chdr) << " = "
  2336. >                 << oct(chdr) << " = "
  2337. >                 << hex(chdr) << "\n";
  2338. > <<<<<
  2339. > oct and hex are included with the Symantec C++ compiler.  They are defined
  2340. > to take and return a reference to an iostream, and are declared as follows:
  2341. >
  2342. > ios& oct(ios&);
  2343. > ios& hex(ios&);
  2344. >
  2345. > so you can use them like this:
  2346. >
  2347. > cout << oct << chdr << " = "
  2348. >      << hex << chdr << "\n";
  2349. >
  2350. > as for the int(chdr) part, that creates a temporary int and initializes it
  2351. > to have the value of chdr.  That is a result of C++'s built in constructor
  2352. > for the int class.
  2353. >
  2354. > Section 10.4.2.1 Standard I/O Manipulators in Stroustrup shows an example
  2355. > of this.
  2356. >
  2357. > -Troy
  2358.  
  2359. Thanx Troy, but what I'm looking for are the functions mentioned on page 54
  2360. of The C++ Programming Language. The sentence describing them reads:
  2361.  "The function oct() produces an octal representation of its integer
  2362. argument, and hex() produces a hexadecimal representation of its integer
  2363. argument; oct() and hex() are declared in <iostream.h>."
  2364.  
  2365. There are exercises on page 74 that require these functions. Anyone else
  2366. seen these? Phil?
  2367.  
  2368. Jason A. Bobier
  2369. k059509@kzoo.edu
  2370.  
  2371. 'Living is easy with eyes closed' -The Beatles
  2372. 
  2373. 
  2374. Path: ucivax!gateway
  2375. From: jimlynch@netcom.com (Jim Lynch)
  2376. Subject: Re:  missing functions (fwd)
  2377. Message-ID: <9307230924.AA16038@netcom2.netcom.com>
  2378. Newsgroups: fa.think-c
  2379. Lines: 14
  2380. Date: 23 Jul 93 09:24:14 GMT
  2381.  
  2382. >>>>>
  2383. Thanx Troy, but what I'm looking for are the functions mentioned on page 54
  2384. of The C++ Programming Language. The sentence describing them reads:
  2385.  "The function oct() produces an octal representation of its integer
  2386. argument, and hex() produces a hexadecimal representation of its integer
  2387. argument; oct() and hex() are declared in <iostream.h>."
  2388. <<<<<
  2389.  
  2390. I tried to use the hex(int) and oct(int) manipulators but they weren't in
  2391. gnu c++. You could write your own... It'll take you awhile to find out how
  2392. to write manipulators, however I think there's some treatment of the subject
  2393. in Think Reference under iostreams. A good explanation probably also is in
  2394. C+C++ by Allen I Holub, a very readible book that goes into considerable
  2395. technical detail about C++. A little more than a double sawbuck...
  2396. 
  2397. 
  2398. Path: ucivax!gateway
  2399. From: Per.Mildner@csd.uu.se (Per Mildner)
  2400. Subject: Re: Managing versions of c files
  2401. X-Sender: perm@meryl.csd.uu.se
  2402. Message-ID: <199307231212.AA22452@meryl.csd.uu.se>
  2403. Newsgroups: fa.think-c
  2404. X-Charset: ASCII
  2405. Lines: 16
  2406. Date: 23 Jul 93 12:12:38 GMT
  2407. X-Char-Esc: 29
  2408.  
  2409. At 00.00 93-07-23 +0000, Atul Barve wrote:
  2410. >
  2411. >Would such a tool be usefull ???
  2412. Possibly, is it available?
  2413. One thing that I would find very useable would be something that does not
  2414. require a shared file-system nor network at all times. Eg, we are a few
  2415. people working on the same software at home. It would be nice to have to
  2416. explicitly check out stuff for modificatin, and to be able to merge or at
  2417. least find all modified sources since the last version. Typically the
  2418. softare is transported on a powerbook (although not developed on one) so
  2419. the merge could require shared AppleTalk.
  2420. Per Mildner                      Per.Mildner@CSD.UU.SE
  2421. Computing Science Dept.
  2422. Uppsala University               tel: +46 18 181049
  2423. Box 311, S-751 05 Uppsala,Sweden fax: +46 18 521270
  2424.  
  2425. 
  2426. 
  2427. Path: ucivax!gateway
  2428. From: sidar@rhi.hi.is (Sigurdur Darri Skulason)
  2429. Subject: bug in comm toolbox interface?
  2430. Message-ID: <9307231759.AA24783@hengill.rhi.hi.is>
  2431. Newsgroups: fa.think-c
  2432. X-Charset: ASCII
  2433. Lines: 42
  2434. Date: 23 Jul 93 18:00:10 GMT
  2435. X-Char-Esc: 29
  2436.  
  2437. I have an communications program which compiled quite nicely under think c 5.
  2438. Recently, after making some modifications I compiled it under thin c 6 and
  2439. started to get a number of problems. When the program was run from the think
  2440. c environment everythink worked out ok. When compiled as a application however
  2441. It always crashed at seemingly random locations during the startup process.
  2442.  
  2443. Rebooting with no inits, rebuilding the project, reinstalling the compiler
  2444. etc changed nothing and very close expection of the code still fails to show
  2445. any bugs anywhere. After elimininating every possible cause for crash and
  2446. stripping away large chunks of code, left me with nothing but the basic
  2447. toolbox initialization and the code:
  2448. if (InitCRM() != cmNoErr)
  2449.         FatalError(eNoCRM);
  2450. and the system hung inside the InitCRM. That only happened though when
  2451. the program was compiled as an application,not when run inside think C.
  2452.  
  2453. I then tried reinstalling the comtoolbox library and creating a small project
  2454. consisting of commtoolbox, mactraps and a test.c containing:
  2455. main() { SysBeep(); }
  2456. running that project beeps nicely, but when I tried to compile a application
  2457. from it, Yo and behold, during linking I get an "Out of memory error".
  2458. Even though think C has 5 mb of memory, no inits installed and running on
  2459. an fx.
  2460.   Removing the CommToolbox I can create an application without problems.
  2461.  
  2462. So I seem to be led to the conclusion that there is something weird about
  2463. the comtoolbox library. I have a fresh copy of think c, the library,
  2464. no inits/cdevs, sys 7.1 on a mac fx.
  2465.  
  2466. Therefore.. the point in this is.. has anyone tried to compile a application
  2467. with think c 6.0 using the comtoolbox undir similar circumstances? If so and
  2468. it has succeded then does anyone have an idea what might be wrong?
  2469. Might some resource in the system be causing this?
  2470.  
  2471. Thanks from a confused Sigurdur.
  2472.  
  2473. --
  2474. //
  2475. // Sigurdur Darri Skulason           [email] sidar@complex.is
  2476. // President,                    [applelink] ICE0008
  2477. // Hugsun computer services            [tel] +354-1-626822
  2478. // Iceland                             [fax] +354-1-626823
  2479. 
  2480. 
  2481. Path: ucivax!gateway
  2482. From: de19@umail.umd.edu (Dana S Emery)
  2483. Subject: Re: Managing versions of c files
  2484. Message-ID: <Mailstrom.1.03.56815.15089.de19@umail.umd.edu>
  2485. In-Reply-To: Your message <199307231212.AA22452@meryl.csd.uu.se> of 23 Jul 93
  2486.  12:12:38 GMT
  2487. Content-Type: TEXT/plain; charset=US-ASCII
  2488. Newsgroups: fa.think-c
  2489. Lines: 17
  2490. Date: 23 Jul 93 22:27:10 GMT
  2491.  
  2492. >  Would such a tool be usefull ???
  2493.  
  2494. maybe, but what I would find even more useful, would be a way to write lock
  2495. source files without haveing to check them in/out of a source manager.
  2496.  
  2497. I like to fiddle with comments, I also like to browse the TCL source code.
  2498. Mixing those 2 is a bad idea.
  2499.  
  2500. I have used MPW projector to protect "library" source, both sysmantec and other,
  2501. but the megabyte sized archive files which are created when one checks in the
  2502. TCL source are a pain to have to keep around.
  2503.  
  2504. The solution is simple enough, just add/remove a dummy checkout flag to whatever
  2505. files need protection.
  2506. --
  2507. dana s emery <de19@umail.umd.edu>
  2508.  
  2509. 
  2510. 
  2511. Path: ucivax!gateway
  2512. From: Francois.Menneteau@imag.fr (Francois Menneteau)
  2513. Subject: Color popup menu problem...
  2514. Message-ID: <199307241150.AA00777@imag.fr>
  2515. Newsgroups: fa.think-c
  2516. Organization: IMAG Institute, University of Grenoble, France
  2517. Lines: 16
  2518. Date: 24 Jul 93 11:49:05 GMT
  2519.  
  2520. Thinkc 5.0.4/TCL 1.1.2 any machine/System 7.1
  2521.  
  2522. I have a color popup menu in a menu. When I pull down it the first time, its
  2523. color are ok. However, when I pull down it the next time, all the colors are
  2524. lost. Have you experiment this? Have you solve this problem?
  2525.  
  2526. PS: I have solve it by using a 'mctb' with an ID of 0, but this does not allow
  2527. real customization...
  2528.  
  2529. Thanks in advance.
  2530.  
  2531. --
  2532. ========================== ()__|||||__() "... I had their lives in my hands
  2533. Francois.Menneteau@imag.fr () /O   O\ () their fate their fortune in my visions
  2534. LGI-IMAG. Tel: 76.51.45.73 () - .|. - () No one believed in my true prophecy
  2535. ========================== ()  \=^=/  () And now it's too late."  (Iron Maiden)
  2536. 
  2537. 
  2538. Path: ucivax!gateway
  2539. From: sidar@rhi.hi.is (Sigurdur Darri Skulason)
  2540. Subject: reason for ctb bug
  2541. Message-ID: <9307251717.AA11238@hengill.rhi.hi.is>
  2542. Newsgroups: fa.think-c
  2543. X-Charset: ASCII
  2544. Lines: 21
  2545. Date: 25 Jul 93 17:18:04 GMT
  2546. X-Char-Esc: 29
  2547.  
  2548. Thanks to those who made suggestions about the reasons for the comm toolbox
  2549. crashing.
  2550. To sum it up: I got a few replies suggesting that smart linking should be
  2551. turned off because it's plainly bugged. I didn't know that so thanks for the
  2552. info.
  2553.  
  2554. Also someone who had got the same problem with out of memory errors using the
  2555. comm toolbox suggested simply to open the comm toolbox library with think c
  2556.  and rebuild a new library from it, since that had solved his problem.
  2557. That proved also to be the solution and I got rid of TC out of memory alerts and
  2558. random crashes in the compiled code.
  2559.  So if anyone has strange problems with the communication toolbox which cannot
  2560. be blamed upon the phase of the moon, then try that solution.
  2561.  
  2562. Thanks,
  2563.   Sigurdur.
  2564. --
  2565. // Sigurdur Darri Skulason           [email] sidar@complex.is
  2566. // President,                    [applelink] ICE0008
  2567. // Hugsun inc.                         [tel] +354-1-626822
  2568. // Iceland & The Netherlands           [fax] +354-1-626823
  2569. 
  2570. 
  2571. Path: ucivax!gateway
  2572. From: psm20@cd.amdahl.com ("Paul S. Michelsen")
  2573. Subject: Objects as resources?
  2574. Message-ID: <9307261727.AA23285@loghost.cd.amdahl.com>
  2575. Newsgroups: fa.think-c
  2576. Lines: 38
  2577. Date: 26 Jul 93 17:28:11 GMT
  2578.  
  2579. I have a large number of objects that I want to store as resources.  I
  2580. want the data in each resource to become the values in the object, but
  2581. without copying everything if possible.  This will allow me to make
  2582. the objects purgible, but easily recoverable with GetResource() (I
  2583. think) and what ever conversion process I did the first time.  The
  2584. data in the objects are constant.
  2585.  
  2586. The objects are instances of several subclasses of a common
  2587. super-class.  Each resource needs to identify the subclass to which
  2588. the object should be a member.  Part of the conversion process from
  2589. resource to object must involve picking the correct subclass.
  2590.  
  2591. In Think C 4, I could use the bless() function.  Each object contained
  2592. a hidden integer, which is used to hold the class type of that
  2593. object.  I used that space in the resource to hold a subclass type ID,
  2594. which is a constant defined in an enum{}.  Upon reading the resource I
  2595. used this ID in a switch statement, each case of which bless()ed the
  2596. resource to be a member of the correct subclass.
  2597.  
  2598. Then I got the Think C 5 upgrade for Christmas.  (And it's already
  2599. obsolete ;-).  I've started working on that code again, but Think C 5
  2600. gives a syntax error on the bless() statement.  I can't find the
  2601. bless() function in any of the indexes of the manuels, or listed with
  2602. the other oops functions.  Is it gone?  Is there something I can
  2603. replace it with?  Or is there a better way to do what I want?
  2604.  
  2605. The number of these objects may grow large enough that I might need to
  2606. manage them myself, without the direct help of the resource manager.
  2607. If this happens then my questions above will be void.
  2608.  
  2609. Thanks.
  2610.  
  2611. =|<>|=  Paul S. Michelsen                  Eventually, computers will be
  2612. =|  |=  psm20@cd.amdahl.com              infinitely fast, impossibly small,
  2613. =|  |=  ext x23224, rm M2-160                       and free.
  2614. =|__|=  Amdahl, Sunnyvale, California
  2615. Public service message: The 21st century begins on 1/1/2001, not 2000.
  2616.  
  2617. 
  2618. 
  2619. Path: ucivax!gateway
  2620. From: rex@paris.docs.uu.se (Rolf Staflin)
  2621. Subject: Address error when linking with IOSTREAMS
  2622. Message-ID: <9307270139.AA18669@Paris.DoCS.UU.SE>
  2623. Newsgroups: fa.think-c
  2624. Reply-To: rex@bern.docs.uu.se
  2625. Lines: 38
  2626. Date: 27 Jul 93 01:39:47 GMT
  2627.  
  2628.  
  2629. Bug report:
  2630. -----------
  2631. If I open the library project IOSTREAM and then choose "Check link"
  2632. from the Project menu, I get a system error similar to
  2633. "Address Error at 00145ED4 'CODE 0014 0294'+45E0".
  2634.  
  2635. My system
  2636. ---------
  2637. Mac Plus, Brainstorm accelerator, 4 Mb RAM, 117 Mb harddisk, StyleWriter.
  2638. Multifinder, Finder S1-6.1.7, System S1-6.0.7, MacsBug 6.2.2. No INITs.
  2639.  
  2640. Comment
  2641. -------
  2642. This means that I can't use the library in any projects, which in turn
  2643. means that I can't do anything useful without resorting to C. My old C
  2644. source (about 80 Kb source, using most of the managers) works fine, though.
  2645.  
  2646.   I tried reinstalling, checking for viruses, running on a friend's
  2647. Mac SE (same result), cursing and more. After reading of Mr.
  2648. Skulason's problem, I tried recompiling the ANSI++ and IOSTREAMS
  2649. libraries. Compiling works fine but the linker still goes down in
  2650. flames. I even tried creating a fresh project, adding all files that
  2651. are in the original IOSTREAMS, copying the options and recompiling.
  2652. Same result - when I choose "Check link", I get an address error in
  2653. stead of the link errors that I should get.
  2654.  
  2655.   I'm surprised that I haven't seen this bug mentioned here before.
  2656. Dozens of people should have complained, unless I am doing something
  2657. wrong (which I hope, but it seems unlikely) or I've hit on a unique
  2658. combination of hard- and software for which the linker doesn't work on
  2659. C++ code. Any help would be appreciated.
  2660.  
  2661. /Rolf
  2662.  
  2663. /* -------------------- */
  2664. Rolf Staflin         Roslagsgatan 2 - 4    S-753 27 Uppsala  SWEDEN
  2665. Phone: +46 18-12 13 94   Fax: +46 18-12 33 94     rex@bern.DoCS.UU.SE
  2666. 
  2667. 
  2668. Path: ucivax!gateway
  2669. From: emg@jobone.metaphor.com (Mike Greenawalt)
  2670. Subject: No library manual?
  2671. Message-ID: <9307271557.AA01444@jobone.Metaphor.COM>
  2672. Newsgroups: fa.think-c
  2673. Lines: 28
  2674. Date: 27 Jul 93 15:58:21 GMT
  2675.  
  2676. I just got my Think C/SC++ upgrade late last week.  I popped open the box and
  2677. started poking through the manuals (where on earth did they find that ghastly
  2678. yellow color?) looking for goodies.
  2679.  
  2680. Suddenly I realized there was something missing!  Where is the library
  2681. reference manual?  It is not mentioned in the list of "What is in the package",
  2682. so I suppose it was not lost.
  2683.  
  2684. Has Symantec decided that the library reference is not needed any longer?  I am
  2685. surprised.  For me, the library reference was/is one of the more frequently-
  2686. used pieces of the former packages.
  2687.  
  2688. It's all well and good that standard ANSI library components are probably
  2689. documented in other places, but what about the non-ANSI stuff such as the
  2690. console library?  What about the unix-like inclusions?  These are not so
  2691. "standard".
  2692.  
  2693. Can I assume that my library reference for version 5 still holds true?  I have
  2694. Think C manuals dating back to version 1.  What does the first-time buyer do
  2695. today?
  2696.  
  2697. +---------------------------+--------------------------------------------+
  2698. | Mike Greenawalt           | emg@metaphor.com                           |
  2699. | Metaphor Computer Systems | Metaphors be with you.                     |
  2700. | 1965 Charleston Road      |                                            |
  2701. | Mountain View, CA 94043   | These opinions are mine, not my employer's |
  2702. +---------------------------+--------------------------------------------+
  2703.  
  2704. 
  2705. 
  2706. Path: ucivax!gateway
  2707. From: siegel@world.std.com (Rich Siegel)
  2708. Subject: Re:  No library manual?
  2709. Message-ID: <199307271715.AA06418@world.std.com>
  2710. Newsgroups: fa.think-c
  2711. Lines: 4
  2712. Date: 27 Jul 93 17:15:56 GMT
  2713.  
  2714. The documentation for the standard libraries is now in a THINK Reference
  2715. database. Lowers their COGS, and makes it easier to look stuff up...
  2716.  
  2717. R.
  2718. 
  2719. 
  2720. Path: ucivax!gateway
  2721. From: crawford@na47sun05.cern.ch (Michael Crawford)
  2722. Subject: Re:  No library manual?
  2723. Message-ID: <9307271816.AA15656@na47sun05.cern.ch>
  2724. Newsgroups: fa.think-c
  2725. Lines: 21
  2726. Date: 27 Jul 93 18:17:08 GMT
  2727.  
  2728. Read the source code, of course!  Lots of people don't realize it's there,
  2729. and once they see ThinkC's ansi implementation, it scares them so much they
  2730. either write their own, or stop using it.
  2731.  
  2732. For a good time, look at the code for atoi - it calls sprintf, instead of
  2733. StringToNum.  Also, the startup code for stdio patches ExitToShell - so you
  2734. will crash if you use it in a code resource, so be sure to comment out
  2735. the patch if you are really going to use it.
  2736.  
  2737. It is helpful to go through the code and create markers for all the functions.
  2738. Also, instead of using libraries, just include the relevant sources in your
  2739. program - it makes it much easier to debug, because you can break in the
  2740. library source within the source debugger.
  2741.  
  2742. Enjoy!
  2743.  
  2744. Michael Crawford   | UC Santa Cruz, visiting CERN
  2745. Division PPE       |
  2746. CERN               | crawford@na47sun05.cern.ch
  2747. 1211 Geneva 23     |
  2748. Switzerland        | "Tilting at windmills for a better tommorrow."
  2749. 
  2750. 
  2751. Path: ucivax!gateway
  2752. From: Jerry.Wilcox@ucop.edu (Jerry Wilcox)
  2753. Subject: Re: No library manual?
  2754. X-Sender: jwilcox@popserv.ucop.edu
  2755. Message-ID: <9307271824.AA12324@will.ucop.edu>
  2756. Newsgroups: fa.think-c
  2757. Lines: 20
  2758. Date: 27 Jul 93 18:26:38 GMT
  2759.  
  2760. Mike Greenawalt writes:
  2761. >Suddenly I realized there was something missing!  Where is the library
  2762. >reference manual?  It is not mentioned in the list of "What is in the package",
  2763. >so I suppose it was not lost.
  2764. >
  2765.  
  2766. No, it was a deliberate omission. Think C 6.0 (and C++) ships with a copy
  2767. of THINK Reference 2.0.1 and a database describing the standard C
  2768. Libraries. All you have to do is put an alias to Think Reference into TPM's
  2769. Tools folder and name it "THINK Reference". When you option-double-click on
  2770. the name of any standard C function, TPM will automatically bring up the
  2771. reference. If you already have (or you purchase) THINK Reference, you have
  2772. the other databases, so you can, for example, do a similar
  2773. option-double-click on a ToolBox call to bring up the reference for that.
  2774.  
  2775. Jerry
  2776. -----
  2777. Jerry Wilcox - iscjcw@uccvma.ucop.edu  or Jerry.Wilcox@ucop.edu
  2778. All opinions are mine alone - the University can speak for itself.
  2779.  
  2780. 
  2781. 
  2782. Path: ucivax!gateway
  2783. From: wwedel@uswest.com (Wally Wedel)
  2784. Subject: Re - No library manual?
  2785. X-Sender: wwedel@saguaro
  2786. Message-ID: <9307271832.AA14952@westward.advtech.uswest.com>
  2787. Newsgroups: fa.think-c
  2788. Lines: 32
  2789. Date: 27 Jul 93 18:32:10 GMT
  2790.  
  2791. Mike Greenawalt <emg@jobone.metaphor.com> writes:
  2792.  
  2793. >Suddenly I realized there was something missing!  Where is the library
  2794. >reference manual?  It is not mentioned in the list of "What is in the package",
  2795. >so I suppose it was not lost.
  2796.  
  2797. In the user manual there is a vague reference to a coupon in the back which
  2798. can be used to order it. The coupon is missing. I called Symantec about
  2799. this and they assured me that no harcopy manual for the standard library is
  2800. available.
  2801.  
  2802. >Has Symantec decided that the library reference is not needed any longer?  I am
  2803. >surprised.  For me, the library reference was/is one of the more frequently-
  2804. >used pieces of the former packages.
  2805.  
  2806. They replaced it with the Think Reference online database. The database
  2807. works pretty well, but I still miss the paper copy and often use the
  2808. Version 5 manual.
  2809.  
  2810. >Can I assume that my library reference for version 5 still holds true?  I have
  2811. >Think C manuals dating back to version 1.  What does the first-time buyer do
  2812. >today?
  2813.  
  2814. The version 5 manual seems to be OK, but I double check stuff with the
  2815. online version to be sure.
  2816.  
  2817. Wally Wedel
  2818. U S WEST Communications
  2819. 4001 Discovery Drive, Suite 370
  2820. Boulder, CO 80303-7813
  2821. Internet: wwedel@uswest.com  AppleLink: D5100   Voice: 303-541-6052
  2822.  
  2823. 
  2824. 
  2825. Path: ucivax!gateway
  2826. From: emg@jobone.metaphor.com (Mike Greenawalt)
  2827. Subject: Summary:  No library manual?
  2828. Message-ID: <9307271847.AA01563@jobone.Metaphor.COM>
  2829. Newsgroups: fa.think-c
  2830. Lines: 13
  2831. Date: 27 Jul 93 18:49:26 GMT
  2832.  
  2833. Thanks for all the many replies.
  2834.  
  2835. Many folks pointed out that the library references are now on-line.  I had not
  2836. yet attempted to install the package yet, so have not run across the files.
  2837. The information is slightly buried in the manual.
  2838.  
  2839. I called Symantec to inquire about the hard copy of the library manual that is
  2840. mentioned in the User's Guide.  The library manuals are not ready yet, but
  2841. they will take your name.
  2842.  
  2843. For myself, I like to have the book in my hands.
  2844.  
  2845. -- Mike
  2846. 
  2847. 
  2848. Path: ucivax!gateway
  2849. From: CUSTER@wrc.wrgrace.com
  2850. Subject: No library manual?
  2851. Message-ID: <930727153052.20201433@wrc.wrgrace.com>
  2852. Newsgroups: fa.think-c
  2853. Lines: 12
  2854. Date: 27 Jul 93 19:31:04 GMT
  2855.  
  2856. Mike Greenawalt asked where the Standard Library Manual was for Symantec C++
  2857. ...
  2858.  
  2859. It's on disk and gets installed to be accessed by the THINK REFERENCE
  2860. application.
  2861.  
  2862. You can argue that the manual was nice, but having it handy online is also
  2863. nice.
  2864.  
  2865. Linda
  2866. custer@wrc.wrgrace.com
  2867.  
  2868. 
  2869. 
  2870. Path: ucivax!gateway
  2871. From: KFISCHER@arac.llnl.gov (Kathleen Fischer)
  2872. Subject: Re:  No library manual?
  2873. Message-ID: <01H11CW5HS1S000IOP@addvax.llnl.gov>
  2874. Newsgroups: fa.think-c
  2875. X-VMS-To: addvax::in%"think-c@ics.uci.EDU"
  2876. Lines: 6
  2877. Date: 27 Jul 93 19:40:33 GMT
  2878. X-Envelope-to: think-c@ics.uci.EDU
  2879.  
  2880. > The documentation for the standard libraries is now in a THINK Reference
  2881. > database. Lowers their COGS, and makes it easier to look stuff up...
  2882.  
  2883. Don't you have to pay for this database?
  2884.  
  2885. Kathleen
  2886. 
  2887. 
  2888. Path: ucivax!gateway
  2889. From: jaa101@deakin.anu.edu.au (James Ashton)
  2890. Subject: Re:  No library manual?
  2891. X-Face: rUK3oMwdIS>EJ!*~|~H$SL4S%-}pU+OhHV"`Q}$Dc<~`Tn"N{RjEJV&9;mM}`@P>F;{+]^2
  2892.      gO,tx/g0M0[tNFyGMNEjNEyoz06a>{r6Ez3Km}'RN`CpF"$[PmCzGD_}|N\*f2a'EOdg-4h
  2893.      7VIL,<0@:t;C/j`^X@_=ckuloh`sGE[eU&W=A#ge3~+"rq9F,r6=9y!V;m};\t],cbJ/|kM
  2894.      5ruHFZfE(]Z}jflI%K9O/A*d{O]'3Jz
  2895. Message-ID: <9307280150.AA29107@gorton.anu.edu.au>
  2896. X-Mailer: ELM [version 2.3 PL11]
  2897. Newsgroups: fa.think-c
  2898. Lines: 19
  2899. Date: 28 Jul 93 01:56:56 GMT
  2900.  
  2901. >From: Kathleen Fischer <KFISCHER@arac.llnl.gov>
  2902. >Subject: Re:  No library manual?
  2903. >Date: 27 Jul 93 19:40:33 GMT
  2904. >
  2905. >> The documentation for the standard libraries is now in a THINK Reference
  2906. >> database. Lowers their COGS, and makes it easier to look stuff up...
  2907. >
  2908. >Don't you have to pay for this database?
  2909.  
  2910. I second this question.  I have the version 5 to version 6 upgrade
  2911. offer but reading it very carefully gives me the impression that the
  2912. new version of Think Reference is not included.  The local distributors
  2913. want AUD 60.00 (about USD 41.00) for it.
  2914. --
  2915. James Ashton                          System Administrator
  2916. VK1XJA                         Department of Systems Engineering
  2917. Voice +61 6 249 0681      Research School of Physical Sciences and Engineering
  2918. FAX   +61 6 249 2698                Australian National University
  2919. Email James.Ashton@anu.edu.au               Canberra ACT 0200 Australia
  2920. 
  2921. 
  2922. Path: ucivax!gateway
  2923. From: tcampbel@world.std.com (Trey Campbell)
  2924. Subject: Re: No library manual?
  2925. Message-ID: <Pine.3.07.9307280048.A1073-a100000@world.std.com>
  2926. In-Reply-To: <9307280150.AA29107@gorton.anu.edu.au>
  2927. Content-Type: TEXT/PLAIN; charset=US-ASCII
  2928. Mime-Version: 1.0
  2929. Newsgroups: fa.think-c
  2930. Lines: 25
  2931. Date: 28 Jul 93 04:20:08 GMT
  2932.  
  2933.  
  2934.  
  2935. On 28 Jul 1993, James Ashton wrote:
  2936.  
  2937. > >From: Kathleen Fischer <KFISCHER@arac.llnl.gov>
  2938. > >Subject: Re:  No library manual?
  2939. > >Date: 27 Jul 93 19:40:33 GMT
  2940. > >
  2941. > >> The documentation for the standard libraries is now in a THINK Reference
  2942. > >> database. Lowers their COGS, and makes it easier to look stuff up...
  2943. > >
  2944. > >Don't you have to pay for this database?
  2945. >
  2946. > I second this question.  I have the version 5 to version 6 upgrade
  2947. > offer but reading it very carefully gives me the impression that the
  2948. > new version of Think Reference is not included.  The local distributors
  2949. > want AUD 60.00 (about USD 41.00) for it.
  2950.  
  2951. You get the latest version of THINK Reference, but without the "Inside
  2952. Macintosh" databases. What you do get are databases for the standard
  2953. libraries C and/or C++. The TR application just lets you use the databases
  2954. provided. You still have to buy the separate product if you want the other
  2955. databases.
  2956.  
  2957.  
  2958. 
  2959. 
  2960. Path: ucivax!gateway
  2961. From: mdl@junior.bintec.de ("Michael D. Lyons")
  2962. Subject: PLEASE DON'T ANSWER MY QUESTION :-)
  2963. Message-ID: <9307280808.AA09208@junior.bintec.de>
  2964. X-Mailer: ELM [version 2.4 PL20]
  2965. Content-Type: text
  2966. Content-Length: 156
  2967. Newsgroups: fa.think-c
  2968. Lines: 6
  2969. Date: 28 Jul 93 08:39:20 GMT
  2970.  
  2971. Hi,
  2972.  
  2973. please don't answer my stupid THINK Ref. question, since I now have the
  2974. correct answer. My posting fingers get a little bit too itchy sometimes.
  2975.  
  2976. Mike
  2977. 
  2978. 
  2979. Path: ucivax!gateway
  2980. From: mdl@junior.bintec.de ("Michael D. Lyons")
  2981. Subject: THINK Reference & THINK C
  2982. Message-ID: <9307280757.AA08704@junior.bintec.de>
  2983. X-Mailer: ELM [version 2.4 PL20]
  2984. Content-Type: text
  2985. Content-Length: 733
  2986. Newsgroups: fa.think-c
  2987. Lines: 15
  2988. Date: 28 Jul 93 08:39:21 GMT
  2989.  
  2990. Hi all,
  2991.  
  2992. I just read in the thread about the "missing" library docs that a
  2993. copy  of THINK Reference 2.x is included in THINK C 6.0.  Is this
  2994. a full-blown version of THINK Ref, or is it a sibset of the  nor-
  2995. mal  THINK  Ref?  I'm  asking this because I was about to upgrade
  2996. from THINK C 5.0 to THINK C 6.0 *and* from THINK Ref 1.0 to 2.0.
  2997.  
  2998. Mike
  2999. --
  3000. +==========================================================================+
  3001. | Michael D. Lyons       | Telefon: +49 911 996750  | EMail: mdl@BinTec.DE |
  3002. | BinTec Computersysteme | Telefax: +49 911 6880725 |                      |
  3003. | Willstaetter Strasse 30 / 90449 Nuernberg / Federal Republic of  GERMANY |
  3004. +==========================================================================+
  3005. 
  3006. 
  3007. Path: ucivax!gateway
  3008. From: lewin@ksr.com (Alex Lewin)
  3009. Subject: Re: Re: No library manual?
  3010. Message-ID: <9307281258.AA06149@steel.ksr.com>
  3011. In-Reply-To: Your message of "28 Jul 93 01:56:56 GMT."
  3012.              <9307280150.AA29107@gorton.anu.edu.au>
  3013. Newsgroups: fa.think-c
  3014. Lines: 33
  3015. Date: 28 Jul 93 12:58:15 GMT
  3016.  
  3017.  
  3018. I have Think Reference--it consists of an application and a bunch of (big!)
  3019. database files. I think the idea is that you get Think Reference minus the
  3020. Inside Mac-ish database files it usually comes with, plus the Standard
  3021. Libraries database.
  3022.  
  3023. I just ordered C++ 6.0, so I guess I'll find out soon!
  3024.  
  3025. Alex
  3026.  
  3027.  
  3028.  
  3029. > >From: Kathleen Fischer <KFISCHER@arac.llnl.gov>
  3030. > >Subject: Re:  No library manual?
  3031. > >Date: 27 Jul 93 19:40:33 GMT
  3032. > >
  3033. > >> The documentation for the standard libraries is now in a THINK Reference
  3034. > >> database. Lowers their COGS, and makes it easier to look stuff up...
  3035. > >
  3036. > >Don't you have to pay for this database?
  3037. >
  3038. > I second this question.  I have the version 5 to version 6 upgrade
  3039. > offer but reading it very carefully gives me the impression that the
  3040. > new version of Think Reference is not included.  The local distributors
  3041. > want AUD 60.00 (about USD 41.00) for it.
  3042. > --
  3043. > James Ashton                          System Administrator
  3044. > VK1XJA                         Department of Systems Engi
  3045. >neering
  3046. > Voice +61 6 249 0681      Research School of Physical Sciences and Engineering
  3047. > FAX   +61 6 249 2698                Australian National University
  3048. > Email James.Ashton@anu.edu.au               Canberra ACT 0200 Australia
  3049.  
  3050. 
  3051. 
  3052. Path: ucivax!gateway
  3053. From: FEATS@vtvm1.cc.vt.edu (Steve Greenfield)
  3054. Subject: ThinkC 4.0 on Centris 650 w/System 7.1
  3055. Message-ID: <9307281004.aa22879@q2.ics.uci.edu>
  3056. Newsgroups: fa.think-c
  3057. Lines: 22
  3058. Date: 28 Jul 93 17:04:50 GMT
  3059.  
  3060. When I run a simple application that uses the ANSI C library, I get the
  3061. following error:
  3062.  
  3063.  
  3064.      code segment too big (ANSI)
  3065.  
  3066.  
  3067. This must be due to the mix of Think C 4.0 and System 7.1.  Do I have
  3068. any alternatives besides buying Think C 5.something?
  3069.  
  3070. I got the 405-updater and have done all the updates except the scanf update.
  3071. I have run the update script but when I try and MAKE the ANSI, ANSI-A4,
  3072. ANSI-881, and ANSI-small projects I'm having trouble.  I double click on
  3073. the respective project and select MAKE from the Source menu.  I click off
  3074. Quick Scan and click Use Disk.  But when I click on MAKE it appears to go
  3075. into some type of loop.  During the compile, it keeps repeating the Lines:
  3076. and incrementing the Total:, forever!
  3077.  
  3078. Can someone help a frustrated user who just wants to learn Think C 4.0?
  3079.  
  3080.  
  3081. /feats@vtvm1.cc.vt.edu
  3082. 
  3083. 
  3084. Path: ucivax!gateway
  3085. From: jpff@maths.bath.ac.uk
  3086. Subject: Re: No library manual?
  3087. Message-ID: <9307281059.aa28494@q2.ics.uci.edu>
  3088. In-reply-to: CUSTER@com.wrgrace.wrc's message of 27 Jul 93 19:31:04 GMT <930727153052.20201433@wrc.wrgrace.com>
  3089. Newsgroups: fa.think-c
  3090. Lines: 4
  3091. Date: 28 Jul 93 17:59:20 GMT
  3092.  
  3093. I really dislike on-line manuals.  They are hard to browse, hard to
  3094. read in bed, and hard to take on a walk in teh countryside.
  3095. Oh well, that is the way of disintegration....
  3096. ==John ff
  3097. 
  3098. 
  3099. Path: ucivax!gateway
  3100. From: sjm@ptltd.com (Steve Morris)
  3101. Subject: Re: No library manual?
  3102. Message-ID: <9307282055.AA07137@yar.ptltd.com>
  3103. In-Reply-To: <9307281059.aa28494@q2.ics.uci.edu> (jpff@maths.bath.ac.uk)
  3104. Newsgroups: fa.think-c
  3105. Lines: 4
  3106. Date: 28 Jul 93 21:30:42 GMT
  3107.  
  3108.  
  3109. That's strange. I really dislike off-line manuals. The one I want is always
  3110. at work when I am at home or vice versa. I never remember which volume I am
  3111. after. I guess that's why both are usually available.
  3112. 
  3113. 
  3114. Path: ucivax!gateway
  3115. From: emg@jobone.metaphor.com (Mike Greenawalt)
  3116. Subject: RE: No library manual?
  3117. Message-ID: <9307290234.AA01932@jobone.Metaphor.COM>
  3118. Newsgroups: fa.think-c
  3119. Lines: 49
  3120. Date: 29 Jul 93 02:35:30 GMT
  3121.  
  3122.  
  3123. >  From: jpff@maths.bath.ac.uk
  3124. >  Subject: Re: No library manual?
  3125. >  Date: 28 Jul 93 17:59:20 GMT
  3126. >  To: think-c@ics.uci.edu
  3127. >
  3128. >  I really dislike on-line manuals.  They are hard to browse, hard to
  3129. >  read in bed, and hard to take on a walk in teh countryside.
  3130. >  Oh well, that is the way of disintegration....
  3131. >  ==John ff
  3132. >
  3133. >  From: Steve Morris <sjm@ptltd.com>
  3134. >  Subject: Re: No library manual?
  3135. >  Date: 28 Jul 93 21:30:42 GMT
  3136. >  To: think-c@ics.uci.edu
  3137. >
  3138. >
  3139. >  That's strange. I really dislike off-line manuals. The one I want is always
  3140. >  at work when I am at home or vice versa. I never remember which volume I am
  3141. >  after. I guess that's why both are usually available.
  3142. >
  3143.  
  3144. It appears that Symantec is going to make both forms available.  After I
  3145. started this discussion on Monday I called Symantec's customer service number
  3146. and inquired about getting the paper manual mentioned in the User's Guide.
  3147.  
  3148. The rep acknowledged the statement about the order form in the back of the book
  3149. was a mistake.  When asked if the manual was really available, he had to put
  3150. me on hold and go ask.  He came back and said they were not printed yet, but
  3151. would be sometime in August.  He promised that because I called Symantec would
  3152. log my interest in the paper manual and customer service would call me when
  3153. they were available.
  3154.  
  3155. I could not get an answer from him when I asked whether the manual would be
  3156. free or extra $$.
  3157.  
  3158. Anyway, I did install the upgrade last night and tried out the Think Reference
  3159. documentation for libraries.  I liked it - very nice.  But, fundamentally I
  3160. have to go along with John's thoughts (above).  I've been known to read
  3161. manuals in lots of places with no computers anywhere about.
  3162.  
  3163. I really appreciate all the answers I got to my question.
  3164.  
  3165. +---------------------------+--------------------------------------------+
  3166. | Mike Greenawalt           | emg@metaphor.com                           |
  3167. | Metaphor Computer Systems | Metaphors be with you.                     |
  3168. | 1965 Charleston Road      |                                            |
  3169. | Mountain View, CA 94043   | These opinions are mine, not my employer's |
  3170. +---------------------------+--------------------------------------------+
  3171. 
  3172. 
  3173. Path: ucivax!gateway
  3174. From: FEATS@vtvm1.cc.vt.edu (Steve Greenfield)
  3175. Subject: Dave Mark's C Primer (Vol 1)
  3176. Message-ID: <9307301333.aa04797@q2.ics.uci.edu>
  3177. Newsgroups: fa.think-c
  3178. Lines: 7
  3179. Date: 30 Jul 93 20:33:56 GMT
  3180.  
  3181. Can I use Dave Mark's C Primer (Volume 1) along with Symantec's Think C
  3182. version 6.0?  Someone suggested there may be documented differences.
  3183. Thanks for any help/advice!
  3184.  
  3185.  
  3186.  
  3187. feats@vtvm1.cc.vt.edu
  3188. 
  3189. 
  3190. Path: ucivax!gateway
  3191. From: alan@kaman.com (alan)
  3192. Subject: Explanation of CACHE problem with '040?
  3193. Message-ID: <9307302242.AA19998@mach10>
  3194. X-Mailer: LeeMail 1.2.4
  3195. Newsgroups: fa.think-c
  3196. Lines: 9
  3197. Date: 30 Jul 93 22:40:10 GMT
  3198.  
  3199. Can anyone provide me with a brief explanation of
  3200. why some programs execute properly with the '040
  3201. cache enabled and some fail?
  3202.  
  3203. Also THINKC/C++ 6.0 does not seem to offer any CACHE
  3204. control options.
  3205.  
  3206. Thanks.
  3207.  
  3208. 
  3209. 
  3210. Path: ucivax!gateway
  3211. From: psm20@cd.amdahl.com ("Paul S. Michelsen")
  3212. Subject: Re: Explanation of CACHE problem with '040?
  3213. >From: alan <alan@kaman.com>
  3214. Message-ID: <9307302349.AA00233@loghost.cd.amdahl.com>
  3215. In-Reply-To: <9307302242.AA19998@mach10> (message from alan on 30 Jul 93 22:40:10 GMT)
  3216. Newsgroups: fa.think-c
  3217. Lines: 25
  3218. Date: 30 Jul 93 23:51:03 GMT
  3219. >Newsgroups: fa.think-c
  3220.  
  3221. >
  3222. >Can anyone provide me with a brief explanation of
  3223. >why some programs execute properly with the '040
  3224. >cache enabled and some fail?
  3225. >
  3226. >Also THINKC/C++ 6.0 does not seem to offer any CACHE
  3227. >control options.
  3228. >
  3229. >Thanks.
  3230. >
  3231.  
  3232. One big problem is with self-modifying code.  The modified code is in
  3233. the data cache, not in the instruction cache where it needs to be.
  3234. The program thus needs to flush the code out of both caches so that
  3235. the instruction cache can load the modified code.  And this needs to
  3236. be done before the code is preloaded into instruction buffers.
  3237.  
  3238. There may be other problems as well.  You might want to post a summery
  3239. to the mail list when you're done.
  3240.  
  3241. I think there are some system or toolbox functions that do cache
  3242. flushing.  This might be in a technical note somewhere.
  3243.  
  3244. Good luck.
  3245.  
  3246. 
  3247. 
  3248. Path: ucivax!gateway
  3249. From: alan@kaman.com (Alan Piszcz)
  3250. Subject: Explanation of CACHE problem with '040?
  3251. Message-ID: <9307310010.AA20252@mach10>
  3252. Newsgroups: fa.think-c
  3253. Lines: 6
  3254. Date: 31 Jul 93 00:07:28 GMT
  3255.  
  3256.  
  3257. Please reply to think-c@ics.uci.edu or
  3258. alan@kaman.com
  3259.  
  3260. Sorry about not specifying in the previous message.
  3261.  
  3262. 
  3263. 
  3264. Path: ucivax!gateway
  3265. From: nagel@rdatasys.com ("Mark D. Nagel")
  3266. Subject: ADMIN: let author summarize (was Re: Explanation of CACHE problem)
  3267. Message-ID: <9057.744088288@rdatasys.com>
  3268. In-Reply-To: Your message of 31 Jul 1993 00:07:28 +0000.
  3269.      <9307310010.AA20252@mach10>
  3270. Content-Type: text/plain; charset="us-ascii"
  3271. Mime-Version: 1.0
  3272. Newsgroups: fa.think-c
  3273. Reply-To: nagel@rdatasys.com
  3274. Organization: Relational Data Systems, Irvine, CA
  3275. Lines: 12
  3276. Date: 31 Jul 93 03:20:40 GMT
  3277. Phone: (714) 263-3899
  3278.  
  3279. On 31 Jul 1993 00:07:28 GMT you wrote:
  3280.  
  3281.     Please reply to think-c@ics.uci.edu or
  3282.     alan@kaman.com
  3283.  
  3284. Please try to respond to the author and let him or her summarize to
  3285. reduce duplicate answers to the entire list.  That last round with
  3286. the Think Reference stuff was a pretty good example what can happen
  3287. otherwise...
  3288.  
  3289. Thanks,
  3290. Mark
  3291. 
  3292. 
  3293. Path: ucivax!gateway
  3294. From: lewin@ksr.com (Alex Lewin)
  3295. Subject: Re:  Explanation of CACHE problem with '040?
  3296. Message-ID: <9307310335.AA04195@steel.ksr.com>
  3297. Newsgroups: fa.think-c
  3298. Lines: 32
  3299. Date: 31 Jul 93 03:36:04 GMT
  3300.  
  3301. > Can anyone provide me with a brief explanation of
  3302. > why some programs execute properly with the '040
  3303. > cache enabled and some fail?
  3304.  
  3305. I'm not sure where to start. Are you asking for a comprehensible explanation of
  3306. cache strategies and the differences among the 68020, 030 and 040 caches, or
  3307. do you understand these differences, and are curious specifically in the context
  3308. of the Mac hardware and OS?
  3309.  
  3310. > Also THINKC/C++ 6.0 does not seem to offer any CACHE
  3311. > control options.
  3312.  
  3313. There are a couple of OS calls. I'm taking this from OSUtils.h
  3314. included with C 5.x:
  3315.  
  3316. pascal Boolean SwapInstructionCache(Boolean cacheEnable);
  3317. pascal void FlushInstructionCache(void);
  3318. pascal Boolean SwapDataCache(Boolean cacheEnable);
  3319. pascal void FlushDataCache(void);
  3320.  
  3321. Actually, now that I look in THINK Reference, I see that there is a
  3322. nice little bit that would answer your first question. I'm not sure if
  3323. it would be legal for me to cut-and-post it. Anyone know? I'm looking
  3324. specifically at the entries for Flush*Cache().
  3325.  
  3326. If you're a real Mac programming weenie, I strongly recommend THINK
  3327. Reference. Makes interesting browsing, answers questions like yours,
  3328. and on my PowerBook, is a weight-conscious alternative to Inside Mac
  3329. and three hundred Tech Notes ;-)
  3330.  
  3331. Alex Lewin
  3332. Certified Mac Weenie
  3333. 
  3334. 
  3335. Path: ucivax!gateway
  3336. From: alan@kaman.com (Alan Piszcz)
  3337. Subject: CACHE ANSWERS
  3338. Message-ID: <9307311038.AA21761@mach10>
  3339. Newsgroups: fa.think-c
  3340. Lines: 123
  3341. Date: 31 Jul 93 10:35:52 GMT
  3342.  
  3343. Thank you everyone for such a quick reply.
  3344. This explains my question.
  3345.  
  3346. Here are the replies:
  3347.  
  3348. From: "Paul S. Michelsen" <psm20@cd.amdahl.com>
  3349. Subject: Re: Explanation of CACHE problem with '040?
  3350.  
  3351. One big problem is with self-modifying code.  The modified code is in
  3352. the data cache, not in the instruction cache where it needs to be.
  3353. The program thus needs to flush the code out of both caches so that
  3354. the instruction cache can load the modified code.  And this needs to
  3355. be done before the code is preloaded into instruction buffers.
  3356.  
  3357. There may be other problems as well.  You might want to post a summery
  3358. to the mail list when you're done.
  3359.  
  3360. I think there are some system or toolbox functions that do cache
  3361. flushing.  This might be in a technical note somewhere.
  3362.  
  3363. Good luck.
  3364.  
  3365.  
  3366.  
  3367.  
  3368. From: huff@mcclb0.med.nyu.edu (Edward J. Huff)
  3369. Subject: Re: Explanation of CACHE problem with '040?
  3370.  
  3371. Cache control follows the same rules as monitor depth, I believe:  only
  3372. users are supposed to change it...  or something like that.  New programs
  3373. shouldn't have trouble with cache, old programs which do have trouble
  3374. wouldn't be able to use any cache control anyway, since they were written
  3375. before the cache existed...
  3376.  
  3377. The 040 instruction cache is the problem, together with programs that
  3378. explicitly write into a code segment, or which contain their own private
  3379. segment loader (like programs compiled under very old versions of Think C).
  3380.  
  3381. A program which writes to RAM will write into the data cache, which is on
  3382. the processor chip.  A store into memory NEVER writes into the instruction
  3383. cache.  The data will also eventually be moved off chip into actual RAM, if
  3384. it is not modified again.  (I am not sure if the data cache is write
  3385. through or not).
  3386.  
  3387. The problem arises when a program writes into a RAM location which has
  3388. already been loaded into the instruction cache, and then branches to that
  3389. location.
  3390. The processor does NOT go out to RAM to read the location.  Instead, it
  3391. uses the contents of the instruction cache, which are incorrect.
  3392.  
  3393. Programs which work properly with the cache do not write into code
  3394. segments, or if they do, they arrange for the instruction cache to be
  3395. marked invalid so that instructions will be refetched.
  3396.  
  3397. --
  3398. Edward J. Huff   huff@mcclb0.med.nyu.edu   (212)998-8465
  3399. Keck Laboratory for Biomolecular Imaging
  3400. NYU Chemistry Deptartment, 31 Washington Place, New York NY 10003
  3401.  
  3402.  
  3403. From: lewin@ksr.com (Alex Lewin)
  3404. Subject: Re:  Explanation of CACHE problem with '040?
  3405.  
  3406. I'm not sure where to start. Are you asking for a comprehensible explanation of
  3407. cache strategies and the differences among the 68020, 030 and 040 caches, or
  3408. do you understand these differences, and are curious specifically in the context
  3409. of the Mac hardware and OS?
  3410.  
  3411. There are a couple of OS calls. I'm taking this from OSUtils.h
  3412. included with C 5.x:
  3413.  
  3414. pascal Boolean SwapInstructionCache(Boolean cacheEnable);
  3415. pascal void FlushInstructionCache(void);
  3416. pascal Boolean SwapDataCache(Boolean cacheEnable);
  3417. pascal void FlushDataCache(void);
  3418.  
  3419. Actually, now that I look in THINK Reference, I see that there is a
  3420. nice little bit that would answer your first question. I'm not sure if
  3421. it would be legal for me to cut-and-post it. Anyone know? I'm looking
  3422. specifically at the entries for Flush*Cache().
  3423.  
  3424. If you're a real Mac programming weenie, I strongly recommend THINK
  3425. Reference. Makes interesting browsing, answers questions like yours,
  3426. and on my PowerBook, is a weight-conscious alternative to Inside Mac
  3427. and three hundred Tech Notes ;-)
  3428.  
  3429. Alex Lewin
  3430. Certified Mac Weenie
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.  
  3437. From: Alex Lewin <lewin@ksr.com>
  3438. To: think-c@ics.uci.edu
  3439.  
  3440. I'm not sure where to start. Are you asking for a comprehensible explanation of
  3441. cache strategies and the differences among the 68020, 030 and 040 caches, or
  3442. do you understand these differences, and are curious specifically in the context
  3443. of the Mac hardware and OS?
  3444.  
  3445. There are a couple of OS calls. I'm taking this from OSUtils.h
  3446. included with C 5.x:
  3447.  
  3448. pascal Boolean SwapInstructionCache(Boolean cacheEnable);
  3449. pascal void FlushInstructionCache(void);
  3450. pascal Boolean SwapDataCache(Boolean cacheEnable);
  3451. pascal void FlushDataCache(void);
  3452.  
  3453. Actually, now that I look in THINK Reference, I see that there is a
  3454. nice little bit that would answer your first question. I'm not sure if
  3455. it would be legal for me to cut-and-post it. Anyone know? I'm looking
  3456. specifically at the entries for Flush*Cache().
  3457.  
  3458. If you're a real Mac programming weenie, I strongly recommend THINK
  3459. Reference. Makes interesting browsing, answers questions like yours,
  3460. and on my PowerBook, is a weight-conscious alternative to Inside Mac
  3461. and three hundred Tech Notes ;-)
  3462.  
  3463. Alex Lewin
  3464. Certified Mac Weenie
  3465.  
  3466. 
  3467. 
  3468. Path: ucivax!gateway
  3469. From: falbukre@eniac.seas.upenn.edu (Ferit M Albukrek)
  3470. Subject: Debugging Code Resources
  3471. Message-ID: <9307311607.AA09844@eniac.seas.upenn.edu>
  3472. X-Mailer: ELM [version 2.3 PL11-upenn1.13]
  3473. Posted-Date: Sat, 31 Jul 93 12:07:31 EDT
  3474. Newsgroups: fa.think-c
  3475. Lines: 27
  3476. Date: 31 Jul 93 16:07:42 GMT
  3477.  
  3478.  
  3479. Hi all,
  3480.  
  3481. I am trying to find ways of debugging my code resources. Since these are not
  3482. stand alone applications, I am unable to use the THINK-C debugger. I tried
  3483. creating an seperate project that executes the code resource where the values
  3484. of the variables are displayed using printf statements. For some reason I
  3485. cannot get the console pop up anymore. I even tried a clean "Hello there!"
  3486. program but the console window still doesn't show up. Whenever I run the
  3487. program MacsBug complains with a bus error. It the THINK-C debugger is running,
  3488. there are no complaints but the console still doesn't show up.
  3489.  
  3490. I will appreciate anyone who can:
  3491.  
  3492. * Help me get my console window back so I can run ANSI programs.
  3493. * Suggest easy ways of debugging code resources. (specifically XCMDs) I tried
  3494.   MacsBug but it seems very complicated and I do not understand 68040 code.
  3495.  
  3496. Thanks a bunch!
  3497.  
  3498. Ferit Albukrek
  3499. falbukre@eniac.seas.upenn.edu
  3500. Language Analysis Center
  3501. University of Pennsylvania
  3502.  
  3503. ps: I am using THINK C 6.0 on a Mac Quadra 950.
  3504.  
  3505. 
  3506.